code: def _apply_zero_shot_models(model_names):
      # Load a small test dataset
      dataset = foz.load_zoo_dataset(
          "coco-2017",
          split="validation",
          dataset_name=fo.get_default_dataset_name(),
          shuffle=True,
          max_samples=10,
      )
      custom_labels = dataset.distinct("ground_truth.detections.label")
  
      for idx, model_name in enumerate(model_names, 1):
          print(
              "Running model %d/%d: '%s'"
              % (idx, len(model_names), model_name)
          )
  
          model = foz.load_zoo_model(
              model_name, class_labels=custom_labels
          )
  
          label_field = (
              model_name.lower().replace("-", "_").replace(".", "_")
          )
  
          dataset.apply_model(
              model, label_field=label_field, batch_size=4
          )
  
          assert len(dataset.exists(label_field)) == len(dataset)
          assert all(
              [
                  label in custom_labels
                  for label in dataset.distinct(f"{label_field}.label")
              ]
          )
  
imports: import random
  import unittest
  import fiftyone
  import fiftyone.zoo
  from fiftyone import ViewField
label_desc: Use image node_id 22 for calling a global function with example usage: _apply_zero_shot_models(model_names) without return types