code: def _validate_model_path(
      model_path: Text, parameter: Text, default: Text
  ) -> Text:
      if model_path is not None and not os.path.exists(model_path):
          reason_str = f"'{model_path}' not found."
          if model_path is None:
              reason_str = f"Parameter '{parameter}' not set."
  
          logger.debug(
              f"{reason_str} Using default location '{default}' instead."
          )
  
          os.makedirs(default, exist_ok=True)
          model_path = default
  
      return model_path
  
file_path: rasa/rasa/cli/run.py
imports: import argparse
  import logging
  import os
  from typing import List, Text
  from rasa.cli import SubParsersAction
  from rasa.cli.arguments import run
  from rasa.shared.constants import DOCS_BASE_URL, DEFAULT_ENDPOINTS_PATH, DEFAULT_CREDENTIALS_PATH, DEFAULT_ACTIONS_PATH, DEFAULT_MODELS_PATH
  from rasa.exceptions import ModelNotFound
label_desc: Use image node_id 3 for calling a global function with example usage: _validate_model_path(model_path, parameter, default) and returns: model_path