code: def test_custom_multitask_image_dataset_imports(basedir):
      # Types of multitask datasets to test
      dataset_types = [
          fo.types.FiftyOneImageLabelsDataset,
          fo.types.BDDDataset,
      ]
  
      # Load a small multitask image dataset
      idataset = foz.load_zoo_dataset(
          "open-images-v6",
          split="validation",
          label_types=["classifications", "detections"],
          dataset_name="image-labels-dataset",
          shuffle=True,
          max_samples=100,
          num_workers=1,  # pytest crashes without this
      )
  
      # Remove labels from some samples
      for s in idataset.take(10):
          s.detections = None
          s.save()
  
      # Test custom imports
      for dataset_type in dataset_types:
          print(dataset_type.__name__)
          export_dir = os.path.join(
              basedir, "custom-imports", dataset_type.__name__
          )
          _run_custom_imports(
              idataset,
              export_dir,
              dataset_type,
              label_field=["positive_labels", "detections"],
              max_samples=3,
          )
  
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 20 for calling a global function with example usage: test_custom_multitask_image_dataset_imports(basedir) without return types