code: def get_zoo_bundle(model_dir, conf, models, conf_key):
      zoo_repo = conf.get("zoo_repo", settings.MONAI_ZOO_REPO)
      auth_token = conf.get("auth_token", settings.MONAI_ZOO_AUTH_TOKEN)
      auth_token = auth_token if auth_token else None
      try:
          zoo_info = get_all_bundles_list(auth_token=auth_token)
      except:
          print("")
          print(
              "---------------------------------------------------------------------------------------"
          )
          print(
              "Github access rate limit reached, please provide personal auth token by setting env MONAI_ZOO_AUTH_TOKEN"
          )
          print("or --conf auth_token <personal auth token>")
          exit(-1)
  
      # filter model zoo bundle with MONAI Label supported bundles according to the maintaining list, return all version bundles list
      available = [i[0] for i in zoo_info if i[0] in MAINTAINED_BUNDLES]
      available_with_version = {
          b: get_bundle_versions(b, auth_token=auth_token)[
              "all_versions"
          ]
          for b in available
      }
  
      available_both = available + [
          k + "_v" + v
          for k, versions in available_with_version.items()
          for v in versions
      ]
  
      version_to_name = {
          k + "_v" + v: k
          for k, versions in available_with_version.items()
          for v in versions
      }
      name_to_version = {
          k + "_v" + v: v
          for k, versions in available_with_version.items()
          for v in versions
      }
      if not models:
          print("")
          print(
              "---------------------------------------------------------------------------------------"
          )
          print(
              "Get models from bundle configs, Please provide --conf models <bundle name>"
          )
          print(
              "Following are the available bundles.  You can pass comma (,) separated names to pass multiple"
          )
          print(f"   -c {conf_key}")
          print("        {}".format(" \n        ".join(available)))
          print(
              "---------------------------------------------------------------------------------------"
          )
          print("")
          exit(-1)
  
      # First check whether the bundle model directory is available and in model-zoo, if no, check local bundle directory.
      # Use zoo bundle if both exist
      invalid_zoo = [m for m in models if m not in available_both]
  
      invalid = [
          m
          for m in invalid_zoo
          if not os.path.isdir(os.path.join(model_dir, m))
      ]
      if invalid:
          print("")
          print(
              "---------------------------------------------------------------------------------------"
          )
          print(
              f"Invalid Model(s) are provided: {invalid}, either not in model zoo or not supported with MONAI Label"
          )
          print(
              "Following are the available models.  You can pass comma (,) separated names to pass multiple"
          )
          print("Available bundle with latest tags:")
          print(f"   -c {conf_key}")
          print("        {}".format(" \n        ".join(available)))
          print("Or provide valid local bundle directories")
          print(
              "---------------------------------------------------------------------------------------"
          )
          print("")
          exit(-1)
  
      bundles: Dict[str, str] = {}
  
      for k in models:
          p = os.path.join(model_dir, k)
          if k not in available_both:
              logger.info(f"+++ Adding Bundle from Local: {k} => {p}")
          else:
              logger.info(f"+++ Adding Bundle from Zoo: {k} => {p}")
              if not os.path.exists(p):
                  name = k if k in available else version_to_name.get(k)
                  version = (
                      None if k in available else name_to_version.get(k)
                  )
                  download(
                      name=name,
                      version=version,
                      bundle_dir=model_dir,
                      source="github",
                      repo=zoo_repo,
                  )
                  if version:
                      shutil.move(os.path.join(model_dir, name), p)
          bundles[k] = p
  
      return bundles
  
imports: import distutils.util
  import hashlib
  import json
  import logging
  import mimetypes
  import os
  import pathlib
  import re
  import shutil
  import subprocess
  import sys
  import tempfile
  import time
  from typing import Dict
  import torch
  from monai.apps import download_url
  from monai.bundle import download, get_bundle_versions
  from monai.bundle.scripts import get_all_bundles_list
  from monailabel.config import settings
  from monailabel.utils.others.modelzoo_list import MAINTAINED_BUNDLES
label_desc: Use image node_id 18 for calling a global function with example usage: get_zoo_bundle(model_dir, conf, models, conf_key) and returns: bundles