code: def get_bundle_models(app_dir, conf, conf_key="models"):
      """
      The funtion to get bundle models either from available model zoo or local files.
      MONAI Label maintains a list of supported bundles, non-labeling bundles are not supported.
      This function will filter available bundles according to the maintaining list.
  
      Args:
          app_dir: the app directory path
          conf: configs of start_server command
          conf_key: default to "models" for monaibundle app, if radiology app wants to use bundle models, "--conf bundles <names>" is used.
  
      Returns:
          a dictionary that contains the available bundles.
  
      Example:
          Bundle name: spleen_ct_segmentation, this will use latest version of the bundle.
          BUndle name with specific version: spleen_ct_segmentation_v0.4.0, this will download the specified version.
      """
      model_dir = os.path.join(app_dir, "model")
  
      zoo_source = conf.get("zoo_source", settings.MONAI_ZOO_SOURCE)
  
      models = conf.get(conf_key)
      models = models.split(",")
      models = [m.strip() for m in models]
  
      if zoo_source == "github":  # if in github env, access model zoo
          bundles = get_zoo_bundle(model_dir, conf, models, conf_key)
      else:  # if not in github env, no "model zoo" access, users either provide bundles locally, or auto download with latest
          bundles: Dict[str, str] = {}
          for k in models:
              p = os.path.join(model_dir, k)
              if os.path.isdir(p):
                  logger.info(
                      f"+++ Adding Bundle from Local: {k} => {p}"
                  )
              else:
                  logger.info(f"+++ Adding Bundle from NGC: {k} => {p}")
                  pattern = re.compile(
                      r"(?P<name>.+)_v(?P<version>\d+\.\d+\.\d+)"
                  )
                  match = pattern.match(k)
                  if match:
                      name = match.group("name")
                      version = match.group("version") or None
                  else:
                      name = k
                      version = None
                  download(
                      name=name,
                      version=version,
                      bundle_dir=model_dir,
                      source=zoo_source,
                  )
  
              bundles[k] = p
  
      logger.info(f"+++ Using Bundle Models: {list(bundles.keys())}")
      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 19 for calling a global function with example usage: get_bundle_models(app_dir, conf, conf_key) and returns: bundles