code: def test_generic_sample_dataset(basedir, img):
      #
      # Classification dataset
      #
  
      images_dir = os.path.join(basedir, "source-images1")
      dataset = _make_classification_dataset(img, images_dir)
  
      # FiftyOneDataset
      export_dir = os.path.join(basedir, "fo-dataset1")
      dataset_type = fo.types.FiftyOneDataset
      dataset.export(export_dir=export_dir, dataset_type=dataset_type)
      dataset2 = fo.Dataset.from_dir(
          dataset_dir=export_dir, dataset_type=dataset_type
      )
  
      #
      # Detection dataset
      #
  
      images_dir = os.path.join(basedir, "source-images2")
      dataset = _make_detection_dataset(img, images_dir)
  
      # FiftyOneDataset
      export_dir = os.path.join(basedir, "fo-dataset2")
      dataset_type = fo.types.FiftyOneDataset
      dataset.export(export_dir=export_dir, dataset_type=dataset_type)
      dataset2 = fo.Dataset.from_dir(
          dataset_dir=export_dir, dataset_type=dataset_type
      )
  
      #
      # ImageLabels dataset
      #
  
      images_dir = os.path.join(basedir, "source-images3")
      dataset = _make_image_labels_dataset(img, images_dir)
  
      # FiftyOneDataset
      export_dir = os.path.join(basedir, "fo-dataset3")
      dataset_type = fo.types.FiftyOneDataset
      dataset.export(export_dir=export_dir, dataset_type=dataset_type)
      dataset2 = 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 13 for calling a global function with example usage: test_generic_sample_dataset(basedir, img) without return types