code: def get_local_path_from_repo_id(
      repo_id, models_root=os.getenv("HF_HOME")
  ):
      # Applicable for diffusers models. Given a repo_id, get the local path of this model if exists
  
      if models_root is None:
          invalidInputError(
              False,
              errMsg="To use repo_id, you must set environmrnt variable `HF_HOME`.",
          )
  
      repo_id, model_id = repo_id.split("/")
      # hardcode the diffusers path so that we only consider local models
      cache_dir = os.path.join(
          models_root, "diffusers", f"models--{repo_id}--{model_id}"
      )
      model_path = get_snapshot_dir_from_cache_dir(cache_dir)
      return model_path
  
imports: import os
  from bigdl.nano.utils.common import invalidInputError
label_desc: Use image node_id 1 for calling a global function with example usage: get_local_path_from_repo_id(repo_id, models_root) and returns: model_path