code: def _upload_artifacts_to_databricks(
      source,
      run_id,
      source_host_uri=None,
      target_databricks_profile_uri=None,
  ):
      """
      Copy the artifacts from ``source`` to the destination Databricks workspace (DBFS) given by
      ``databricks_profile_uri`` or the current tracking URI.
      :param source: Source location for the artifacts to copy.
      :param run_id: Run ID to associate the artifacts with.
      :param source_host_uri: Specifies the source artifact's host URI (e.g. Databricks tracking URI)
          if applicable. If not given, defaults to the current tracking URI.
      :param target_databricks_profile_uri: Specifies the destination Databricks host. If not given,
          defaults to the current tracking URI.
      :return: The DBFS location in the target Databricks workspace the model files have been
          uploaded to.
      """
  
      with tempfile.TemporaryDirectory() as local_dir:
          source_with_profile = (
              add_databricks_profile_info_to_artifact_uri(
                  source, source_host_uri
              )
          )
          _download_artifact_from_uri(source_with_profile, local_dir)
          dest_root = "dbfs:/databricks/mlflow/tmp-external-source/"
          dest_root_with_profile = (
              add_databricks_profile_info_to_artifact_uri(
                  dest_root, target_databricks_profile_uri
              )
          )
          dest_repo = DbfsRestArtifactRepository(dest_root_with_profile)
          dest_artifact_path = run_id if run_id else uuid.uuid4().hex
          # Allow uploading from the same run id multiple times by randomizing a suffix
          if len(dest_repo.list_artifacts(dest_artifact_path)) > 0:
              dest_artifact_path = (
                  dest_artifact_path + "-" + uuid.uuid4().hex[0:4]
              )
          dest_repo.log_artifacts(
              local_dir, artifact_path=dest_artifact_path
          )
          dirname = pathlib.PurePath(
              source
          ).name  # innermost directory name
          return posixpath.join(dest_root, dest_artifact_path, dirname)
  
file_path: mlflow/mlflow/tracking/artifact_utils.py
imports: import os
  import pathlib
  import posixpath
  import tempfile
  import urllib.parse
  import uuid
  from mlflow.exceptions import MlflowException
  from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE
  from mlflow.store.artifact.artifact_repository_registry import get_artifact_repository
  from mlflow.store.artifact.dbfs_artifact_repo import DbfsRestArtifactRepository
  from mlflow.store.artifact.models_artifact_repo import ModelsArtifactRepository
  from mlflow.tracking._tracking_service.utils import _get_store
  from mlflow.utils.file_utils import path_to_local_file_uri
  from mlflow.utils.uri import add_databricks_profile_info_to_artifact_uri, append_to_uri_path
label_desc: Use image node_id 5 for calling a global function with example usage: _upload_artifacts_to_databricks(source, run_id, source_host_uri, target_databricks_profile_uri) and returns: posixpath