code: def _load_model_fit_in_spark(
      local_model_path: str, flavor_conf, **kwargs
  ):
      """
      Loads a Diviner model that has been fit (and saved) in the Spark variant.
      """
      # NB: To load the model DataFrame (which is a Spark DataFrame), Spark requires that the file
      # partitions are in DFS. In order to facilitate this, the model DataFrame (saved as parquet)
      # will be copied to a temporary DFS location. The remaining files can be read directly from
      # the local file system path, which is handled within the Diviner APIs.
      import diviner
  
      dfs_temp_directory = generate_tmp_dfs_path(
          kwargs.get("dfs_tmpdir", MLFLOW_DFS_TMP.get())
      )
      dfs_fuse_directory = dbfs_hdfs_uri_to_fuse_path(
          dfs_temp_directory
      )
      os.makedirs(dfs_fuse_directory)
      shutil_copytree_without_file_permissions(
          src_dir=local_model_path, dst_dir=dfs_fuse_directory
      )
  
      diviner_instance = getattr(diviner, flavor_conf[_MODEL_TYPE_KEY])
      load_directory = os.path.join(
          dfs_fuse_directory, flavor_conf[_MODEL_BINARY_KEY]
      )
  
      return diviner_instance.load(load_directory)
  
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 5 for calling a global function with example usage: _load_model_fit_in_spark(local_model_path, flavor_conf) and returns: diviner_instance