code: def get_nfs_cache_root_dir():
      if is_in_databricks_runtime():
          spark_sess = _get_active_spark_session()
          nfs_enabled = spark_sess and (
              spark_sess.conf.get(
                  "spark.databricks.mlflow.nfs.enabled", "true"
              ).lower()
              == "true"
          )
          if nfs_enabled:
              try:
                  # The directory `getReplNFSTempDir` returns has read/write permissions.
                  return _get_dbutils().entry_point.getReplNFSTempDir()
              except Exception:
                  nfs_root_dir = "/local_disk0/.ephemeral_nfs"
                  # Test whether the NFS directory is writable.
                  test_path = os.path.join(
                      nfs_root_dir, uuid.uuid4().hex
                  )
                  try:
                      os.makedirs(test_path)
                      return nfs_root_dir
                  except Exception:
                      # For databricks cluster enabled Table ACL, we have no permission to access NFS
                      # directory, in this case, return None, meaning NFS is not available.
                      return None
                  finally:
                      shutil.rmtree(test_path, ignore_errors=True)
          else:
              return None
      else:
          spark_session = _get_active_spark_session()
          if spark_session is not None:
              return spark_session.conf.get(
                  "spark.mlflow.nfs.rootDir", None
              )
  
imports: import os
  import shutil
  import uuid
  from mlflow.utils._spark_utils import _get_active_spark_session
  from mlflow.utils.databricks_utils import _get_dbutils, is_in_databricks_runtime
label_desc: Use image node_id 1 for calling a global function with example usage: get_nfs_cache_root_dir() and returns: None, spark_session, _get_dbutils, nfs_root_dir, None