code: def load_zoo_model(
      name,
      download_if_necessary=True,
      ensure_requirements=True,
      install_requirements=False,
      error_level=None,
      cache=True,
      **kwargs,
  ):
      """Loads the model of the given name from the FiftyOne Model Zoo.
  
      By default, the model will be downloaded if necessary, and any documented
      package requirements will be checked to ensure that they are installed.
  
      Args:
          name: the name of the zoo model, which can have ``@<ver>`` appended to
              refer to a specific version of the model. If no version is
              specified, the latest version of the model is downloaded. Call
              :func:`list_zoo_models` to see the available models
          download_if_necessary (True): whether to download the model if it is
              not found in the specified directory
          ensure_requirements (True): whether to ensure any requirements are
              installed before loading the model. By default, this is True
          install_requirements: whether to install any requirements before
              loading the model. By default, this is False
          error_level (None): the error level to use when installing/ensuring
              requirements, defined as:
  
              -   0: raise error if a requirement is not satisfied
              -   1: log warning if a requirement is not satisifed
              -   2: ignore unsatisifed requirements
  
              By default, ``fo.config.requirement_error_level`` is used
          cache (True): whether to store a weak reference to the model so that
              running this method again will return the same instance while the
              model is still in use. If False, no weak reference is stored/used
          **kwargs: keyword arguments to inject into the model's ``Config``
              instance
  
      Returns:
          a :class:`fiftyone.core.models.Model`
      """
      if cache and name in _MODELS:
          return _MODELS[name]
  
      if error_level is None:
          error_level = fo.config.requirement_error_level
  
      model = _get_model(name)
      models_dir = fo.config.model_zoo_dir
  
      if model.manager is not None and not model.is_in_dir(models_dir):
          if not download_if_necessary:
              raise ValueError("Model '%s' is not downloaded" % name)
  
          download_zoo_model(name)
  
      if install_requirements:
          model.install_requirements(error_level=error_level)
      elif ensure_requirements:
          model.ensure_requirements(error_level=error_level)
  
      config_dict = deepcopy(model.default_deployment_config_dict)
      model_path = model.get_path_in_dir(models_dir)
  
      model = fom.load_model(
          config_dict, model_path=model_path, **kwargs
      )
  
      if cache:
          _MODELS[name] = model
  
      return model
  
imports: from collections import defaultdict
  from copy import deepcopy
  import logging
  import os
  import weakref
  from eta.core.config import ConfigError
  import eta.core.learning
  import eta.core.models
  import eta.core.utils
  import fiftyone
  import fiftyone.core.models
label_desc: Use image node_id 7 for calling a global function with example usage: load_zoo_model(name, download_if_necessary, ensure_requirements, install_requirements, error_level, cache) and returns: model, _MODELS