code: def load_model(model_uri, dst_path=None, **kwargs):
      """Load a ``Diviner`` object from a local file or a run.
  
      Args:
          model_uri: The location, in URI format, of the MLflow model. For example:
  
              - ``/Users/me/path/to/local/model``
              - ``relative/path/to/local/model``
              - ``s3://my_bucket/path/to/model``
              - ``runs:/<mlflow_run_id>/run-relative/path/to/model``
              - ``mlflow-artifacts:/path/to/model``
  
              For more information about supported URI schemes, see
              `Referencing Artifacts <https://www.mlflow.org/docs/latest/tracking.html#
              artifact-locations>`_.
          dst_path: The local filesystem path to which to download the model artifact.
              This directory must already exist if provided. If unspecified, a local output
              path will be created.
          kwargs: Optional configuration options for loading of a Diviner model. For models
              that have been fit and saved using Spark, if a specific DFS temporary directory
              is desired for loading of Diviner models, use the keyword argument
              `"dfs_tmpdir"` to define the loading temporary path for the model during loading.
  
      Returns:
          A ``Diviner`` model instance.
      """
      model_uri = str(model_uri)
  
      flavor_conf = _get_flavor_configuration_from_uri(
          model_uri, FLAVOR_NAME, _logger
      )
  
      local_model_path = _download_artifact_from_uri(
          artifact_uri=model_uri, output_path=dst_path
      )
  
      _add_code_from_conf_to_system_path(local_model_path, flavor_conf)
  
      if flavor_conf.get(_SPARK_MODEL_INDICATOR, False):
          return _load_model_fit_in_spark(
              local_model_path, flavor_conf, **kwargs
          )
  
      return _load_model(local_model_path, flavor_conf)
  
imports: import logging
  import os
  import pathlib
  import shutil
  from typing import Any, Dict, List, Optional, Tuple
  import pandas
  import yaml
  import mlflow
  from mlflow import pyfunc
  from mlflow.environment_variables import MLFLOW_DFS_TMP
  from mlflow.exceptions import MlflowException
  from mlflow.models import Model, ModelInputExample, ModelSignature
  from mlflow.models.model import MLMODEL_FILE_NAME
  from mlflow.models.utils import _save_example
  from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE
  from mlflow.tracking._model_registry import DEFAULT_AWAIT_MAX_SLEEP_SECONDS
  from mlflow.tracking.artifact_utils import _download_artifact_from_uri
  from mlflow.utils.docstring_utils import LOG_MODEL_PARAM_DOCS, format_docstring
  from mlflow.utils.environment import _CONDA_ENV_FILE_NAME, _CONSTRAINTS_FILE_NAME, _PYTHON_ENV_FILE_NAME, _REQUIREMENTS_FILE_NAME, _mlflow_conda_env, _process_conda_env, _process_pip_requirements, _PythonEnv, _validate_env_arguments
  from mlflow.utils.file_utils import get_total_file_size, shutil_copytree_without_file_permissions, write_to
  from mlflow.utils.model_utils import _add_code_from_conf_to_system_path, _get_flavor_configuration, _get_flavor_configuration_from_uri, _validate_and_copy_code_paths, _validate_and_prepare_target_save_path
  from mlflow.utils.requirements_utils import _get_pinned_requirement
  from mlflow.utils.uri import dbfs_hdfs_uri_to_fuse_path, generate_tmp_dfs_path
label_desc: Use image node_id 6 for calling a global function with example usage: load_model(model_uri, dst_path) and returns: _load_model, _load_model_fit_in_spark