code: def delete(ids, yes):
      
      failures = False
  
      for id in ids:
          data_source = get_data_object(id, use_data_config=True)
  
          if not data_source:
              failures = True
              continue
  
          data_name = normalize_data_name(data_source.name)
          suffix = data_name.split('/')[-1]
          if not suffix.isdigit():
              failures = True
              floyd_logger.error('%s is not a dataset, skipped.', id)
              if suffix == 'output':
                  floyd_logger.error('To delete job output, please delete the job itself.')
              continue
  
          if not yes and not click.confirm("Delete Data: {}?".format(data_name),
                                           abort=False,
                                           default=False):
              floyd_logger.info("Data %s: Skipped", data_name)
              continue
  
          if not DataClient().delete(data_source.id):
              failures = True
          else:
              floyd_logger.info("Data %s: Deleted", data_name)
  
      if failures:
          sys.exit(1)
docs: Delete datasets.