code: def _apply_models_with_logits(model_names, store_logits=True):
      dataset = foz.load_zoo_dataset(
          "imagenet-sample",
          dataset_name=fo.get_default_dataset_name(),
          shuffle=True,
          max_samples=1,
      )
  
      label_fields = []
      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)
  
          label_field = (
              model_name.lower().replace("-", "_").replace(".", "_")
          )
          dataset.apply_model(
              model,
              label_field=label_field,
              confidence_thresh=None,
              store_logits=store_logits,
          )
          label_fields.append(label_field)
  
      for sample in dataset:
          for field in label_fields:
              if store_logits:
                  assert sample[field].logits is not None
                  assert sample[field].logits.ndim == 1
              else:
                  assert sample[field].logits is None
  
imports: import random
  import unittest
  import fiftyone
  import fiftyone.zoo
  from fiftyone import ViewField
label_desc: Use image node_id 20 for calling a global function with example usage: _apply_models_with_logits(model_names, store_logits) without return types