code: def hf_model(model_str):
      api = HfApi()
      models = [m.modelId for m in api.list_models()]
      if model_str in models:
          return model_str
      else:
          raise HFModelNotFoundError(model_str)
  
file_path: serve/examples/large_models/deepspeed_mii/Download_deepseed_mii_models.py
imports: import argparse
  import os
  from huggingface_hub import HfApi, snapshot_download
label_desc: Use image node_id 2 for calling a global function with example usage: hf_model(model_str) and returns: model_str