code: def get_local_model(model_path: Text = DEFAULT_MODELS_PATH) -> Text:
      """Returns verified path to local model archive.
  
      Args:
          model_path: Path to the zipped model. If it's a directory, the latest
                      trained model is returned.
  
      Returns:
          Path to the zipped model. If it's a directory, the latest
                      trained model is returned.
  
      Raises:
          ModelNotFound Exception: When no model could be found at the provided path.
  
      """
      if not model_path:
          raise ModelNotFound("No path specified.")
      elif not os.path.exists(model_path):
          raise ModelNotFound(
              f"No file or directory at '{model_path}'."
          )
  
      if os.path.isdir(model_path):
          file_model_path = get_latest_model(model_path)
          if not file_model_path:
              raise ModelNotFound(
                  f"Could not find any Rasa model files in '{model_path}'."
              )
          model_path = file_model_path
      elif not model_path.endswith(".tar.gz"):
          raise ModelNotFound(
              f"Path '{model_path}' does not point to a Rasa model file."
          )
  
      return model_path
  
file_path: rasa/rasa/model.py
imports: import glob
  import hashlib
  import logging
  import os
  from pathlib import Path
  from subprocess import check_output, DEVNULL, CalledProcessError
  from typing import Text, Optional, Union
  from rasa.shared.constants import DEFAULT_MODELS_PATH
  from rasa.exceptions import ModelNotFound
label_desc: Use image node_id 1 for calling a global function with example usage: get_local_model(model_path) and returns: model_path