code: def test_labeled_datasets_with_no_labels(basedir, img):
      # Create a classification dataset
      images_dir = os.path.join(basedir, "source-images")
      dataset = _make_labeled_dataset_with_no_labels(img, images_dir)
  
      # FiftyOneImageClassificationDataset
      export_dir = os.path.join(
          basedir, "FiftyOneImageClassificationDataset"
      )
      dataset_type = fo.types.FiftyOneImageClassificationDataset
      dataset.export(
          export_dir=export_dir,
          dataset_type=dataset_type,
          label_field="ground_truth",
      )
      fo.Dataset.from_dir(
          dataset_dir=export_dir, dataset_type=dataset_type
      )
  
      # ImageClassificationDirectoryTree
      export_dir = os.path.join(
          basedir, "ImageClassificationDirectoryTree"
      )
      dataset_type = fo.types.ImageClassificationDirectoryTree
      dataset.export(
          export_dir=export_dir,
          dataset_type=dataset_type,
          label_field="ground_truth",
      )
      fo.Dataset.from_dir(
          dataset_dir=export_dir, dataset_type=dataset_type
      )
  
      # TFImageClassificationDataset
      export_dir = os.path.join(basedir, "TFImageClassificationDataset")
      images_dir = os.path.join(
          basedir, "TFImageClassificationDataset/unpacked-images"
      )
      dataset_type = fo.types.TFImageClassificationDataset
      dataset.export(
          export_dir=export_dir,
          dataset_type=dataset_type,
          label_field="ground_truth",
      )
      fo.Dataset.from_dir(
          dataset_dir=export_dir,
          dataset_type=dataset_type,
          images_dir=images_dir,
      )
  
      # FiftyOneImageDetectionDataset
      export_dir = os.path.join(
          basedir, "FiftyOneImageDetectionDataset"
      )
      dataset_type = fo.types.FiftyOneImageDetectionDataset
      dataset.export(
          export_dir=export_dir,
          dataset_type=dataset_type,
          label_field="ground_truth",
      )
      fo.Dataset.from_dir(
          dataset_dir=export_dir, dataset_type=dataset_type
      )
  
      # COCODetectionDataset
      export_dir = os.path.join(basedir, "COCODetectionDataset")
      dataset_type = fo.types.COCODetectionDataset
      dataset.export(
          export_dir=export_dir,
          dataset_type=dataset_type,
          label_field="ground_truth",
      )
      fo.Dataset.from_dir(
          dataset_dir=export_dir, dataset_type=dataset_type
      )
  
      # VOCDetectionDataset
      export_dir = os.path.join(basedir, "VOCDetectionDataset")
      dataset_type = fo.types.VOCDetectionDataset
      dataset.export(
          export_dir=export_dir,
          dataset_type=dataset_type,
          label_field="ground_truth",
      )
      fo.Dataset.from_dir(
          dataset_dir=export_dir, dataset_type=dataset_type
      )
  
      # KITTIDetectionDataset
      export_dir = os.path.join(basedir, "KITTIDetectionDataset")
      dataset_type = fo.types.KITTIDetectionDataset
      dataset.export(
          export_dir=export_dir,
          dataset_type=dataset_type,
          label_field="ground_truth",
      )
      fo.Dataset.from_dir(
          dataset_dir=export_dir, dataset_type=dataset_type
      )
  
      # YOLOv4Dataset
      export_dir = os.path.join(basedir, "YOLOv4Dataset")
      dataset_type = fo.types.YOLOv4Dataset
      dataset.export(
          export_dir=export_dir,
          dataset_type=dataset_type,
          label_field="ground_truth",
      )
      fo.Dataset.from_dir(
          dataset_dir=export_dir, dataset_type=dataset_type
      )
  
      # YOLOv5Dataset
      export_dir = os.path.join(basedir, "YOLOv5Dataset")
      dataset_type = fo.types.YOLOv5Dataset
      dataset.export(
          export_dir=export_dir,
          dataset_type=dataset_type,
          label_field="ground_truth",
      )
      fo.Dataset.from_dir(
          dataset_dir=export_dir, dataset_type=dataset_type
      )
  
      # TFObjectDetectionDataset
      export_dir = os.path.join(basedir, "TFObjectDetectionDataset")
      images_dir = os.path.join(
          basedir, "TFObjectDetectionDataset/unpacked-images"
      )
      dataset_type = fo.types.TFObjectDetectionDataset
      dataset.export(
          export_dir=export_dir,
          dataset_type=dataset_type,
          label_field="ground_truth",
      )
      fo.Dataset.from_dir(
          dataset_dir=export_dir,
          dataset_type=dataset_type,
          images_dir=images_dir,
      )
  
      # CVATImageDataset
      export_dir = os.path.join(basedir, "CVATImageDataset")
      dataset_type = fo.types.CVATImageDataset
      dataset.export(
          export_dir=export_dir,
          dataset_type=dataset_type,
          label_field="ground_truth",
      )
      fo.Dataset.from_dir(
          dataset_dir=export_dir, dataset_type=dataset_type
      )
  
      # FiftyOneImageLabelsDataset
      export_dir = os.path.join(basedir, "FiftyOneImageLabelsDataset")
      dataset_type = fo.types.FiftyOneImageLabelsDataset
      dataset.export(
          export_dir=export_dir,
          dataset_type=dataset_type,
          label_field="ground_truth",
      )
      fo.Dataset.from_dir(
          dataset_dir=export_dir, dataset_type=dataset_type
      )
  
      # BDDDataset
      export_dir = os.path.join(basedir, "BDDDataset")
      dataset_type = fo.types.BDDDataset
      dataset.export(
          export_dir=export_dir,
          dataset_type=dataset_type,
          label_field="ground_truth",
      )
      fo.Dataset.from_dir(
          dataset_dir=export_dir, dataset_type=dataset_type
      )
  
      # FiftyOneDataset
      export_dir = os.path.join(basedir, "FiftyOneDataset")
      dataset_type = fo.types.FiftyOneDataset
      dataset.export(export_dir=export_dir, dataset_type=dataset_type)
      fo.Dataset.from_dir(
          dataset_dir=export_dir, dataset_type=dataset_type
      )
  
imports: import random
  import os
  import numpy
  import pytest
  import eta.core.utils
  import fiftyone
  import fiftyone.utils.image
  import fiftyone.brain
  import fiftyone.zoo
  from fiftyone import ViewField
label_desc: Use image node_id 16 for calling a global function with example usage: test_labeled_datasets_with_no_labels(basedir, img) without return types