def METHOD_NAME(model_path: Union[str, Path]) -> Dict[str, Any]:
    # from the model path, get the config.json file and return it as a dict.
    model_path = Path(model_path) if isinstance(model_path, str) else model_path
    if not model_path.is_dir():
        raise ValueError(
            f"`model_path` is expected to be a directory, found {model_path}"
        )
    config_file = [file for file in model_path.iterdir() if file.name == "config.json"]
    config_file = config_file[0]
    with open(config_file) as f:
        config = json.load(f)
    _LOGGER.info(f"Loaded config file {config_file} for model: {config['model_type']}")
    return config