code: def get_zoo_config(
      key,
      variation="defaults",
      zoo_config_path=None,
      zoo_type="datasets",
  ):
      version = None
      resources = None
      if zoo_config_path is None:
          zoo_config_path = os.path.join(
              "configs", "zoo", f"{zoo_type}.yaml"
          )
      zoo = load_yaml(zoo_config_path)
  
      # Set struct on zoo so that unidentified access is not allowed
      OmegaConf.set_struct(zoo, True)
  
      try:
          item = OmegaConf.select(zoo, key)
      except Exception:
          # Key wasn't present or something else happened, return None, None
          return version, resources
  
      if not item:
          return version, resources
  
      if variation not in item:
          # If variation is not present, then key value should
          # be directly returned if "defaults" was selected as the variation
          assert (
              variation == "defaults"
          ), f"'{variation}' variation not present in zoo config"
          return _get_version_and_resources(item)
      elif "resources" in item:
          # Case where full key is directly passed
          return _get_version_and_resources(item)
      else:
          return _get_version_and_resources(item[variation])
  
imports: import collections
  import json
  import logging
  import os
  import warnings
  from ast import literal_eval
  from typing import List
  import torch
  from mmf.common.registry import registry
  from mmf.utils.env import import_user_module
  from mmf.utils.file_io import PathManager
  from mmf.utils.general import get_absolute_path, get_mmf_root
  from omegaconf import DictConfig, errors, OmegaConf
label_desc: Use image node_id 4 for calling a global function with example usage: get_zoo_config(key, variation, zoo_config_path, zoo_type) and returns: version,  resources, _get_version_and_resources, version,  resources, _get_version_and_resources, _get_version_and_resources