code: def _should_use_mlflowdbfs(root_uri):
      # The `mlflowdbfs` scheme does not appear in the available schemes returned from
      # the Hadoop FileSystem API until a read call has been issued.
      from mlflow.utils._spark_utils import _get_active_spark_session
  
      if (
          not is_valid_dbfs_uri(root_uri)
          or not is_databricks_acled_artifacts_uri(root_uri)
          or not databricks_utils.is_in_databricks_runtime()
          or (
              environment_variables._DISABLE_MLFLOWDBFS.get() or ""
          ).lower()
          == "true"
      ):
          return False
  
      try:
          databricks_utils._get_dbutils()
      except Exception:
          # If dbutils is unavailable, indicate that mlflowdbfs is unavailable
          # because usage of mlflowdbfs depends on dbutils
          return False
  
      mlflowdbfs_read_exception_str = None
      try:
          _get_active_spark_session().read.load(
              "mlflowdbfs:///artifact?run_id=foo&path=/bar"
          )
      except Exception as e:
          # The load invocation is expected to throw an exception.
          mlflowdbfs_read_exception_str = str(e)
  
      try:
          return _HadoopFileSystem.is_filesystem_available(
              _MLFLOWDBFS_SCHEME
          )
      except Exception:
          # The HDFS filesystem logic used to determine mlflowdbfs availability on Databricks
          # clusters may not work on certain Databricks cluster types due to unavailability of
          # the _HadoopFileSystem.is_filesystem_available() API. As a temporary workaround,
          # we check the contents of the expected exception raised by a dummy mlflowdbfs
          # read for evidence that mlflowdbfs is available. If "MlflowdbfsClient" is present
          # in the exception contents, we can safely assume that mlflowdbfs is available because
          # `MlflowdbfsClient` is exclusively used by mlflowdbfs for performing MLflow
          # file storage operations
          #
          # TODO: Remove this logic once the _HadoopFileSystem.is_filesystem_available() check
          # below is determined to work on all Databricks cluster types
          return "MlflowdbfsClient" in (
              mlflowdbfs_read_exception_str or ""
          )
  
imports: import logging
  import os
  import posixpath
  import re
  import shutil
  from typing import Any, Dict, Optional
  import pandas
  import yaml
  from packaging.version import Version
  import mlflow
  from mlflow import environment_variables, mleap, pyfunc
  from mlflow.environment_variables import MLFLOW_DFS_TMP
  from mlflow.exceptions import MlflowException
  from mlflow.models import Model, ModelInputExample, ModelSignature, infer_signature
  from mlflow.models.model import MLMODEL_FILE_NAME
  from mlflow.models.signature import _LOG_MODEL_INFER_SIGNATURE_WARNING_TEMPLATE
  from mlflow.models.utils import _Example, _save_example
  from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE
  from mlflow.store.artifact.databricks_artifact_repo import DatabricksArtifactRepository
  from mlflow.tracking._model_registry import DEFAULT_AWAIT_MAX_SLEEP_SECONDS
  from mlflow.tracking.artifact_utils import _download_artifact_from_uri, _get_root_uri_and_artifact_path
  from mlflow.utils import _get_fully_qualified_class_name, databricks_utils
  from mlflow.utils.autologging_utils import autologging_integration, safe_patch
  from mlflow.utils.class_utils import _get_class_from_string
  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 TempDir, 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_from_uri, _validate_and_copy_code_paths
  from mlflow.utils.requirements_utils import _get_pinned_requirement
  from mlflow.utils.uri import append_to_uri_path, dbfs_hdfs_uri_to_fuse_path, generate_tmp_dfs_path, get_databricks_profile_uri_from_artifact_uri, is_databricks_acled_artifacts_uri, is_local_uri, is_valid_dbfs_uri
label_desc: Use image node_id 6 for calling a global function with example usage: _should_use_mlflowdbfs(root_uri) and returns: False, _HadoopFileSystem, False, unknown