code: def _get_root_uri_and_artifact_path(artifact_uri):
      """
      Parse the artifact_uri to get the root_uri and artifact_path.
      :param artifact_uri: The *absolute* URI of the artifact.
      """
      if os.path.exists(artifact_uri):
          if os.name != "nt":
              # If we're dealing with local files, just reference the direct pathing.
              # non-nt-based file systems can directly reference path information, while nt-based
              # systems need to url-encode special characters in directory listings to be able to
              # resolve them (i.e., spaces converted to %20 within a file name or path listing)
              root_uri = os.path.dirname(artifact_uri)
              artifact_path = os.path.basename(artifact_uri)
              return root_uri, artifact_path
          else:  # if we're dealing with nt-based systems, we need to utilize pathname2url to encode.
              artifact_uri = path_to_local_file_uri(artifact_uri)
  
      parsed_uri = urllib.parse.urlparse(str(artifact_uri))
      prefix = ""
      if parsed_uri.scheme and not parsed_uri.path.startswith("/"):
          # relative path is a special case, urllib does not reconstruct it properly
          prefix = parsed_uri.scheme + ":"
          parsed_uri = parsed_uri._replace(scheme="")
  
      # For models:/ URIs, it doesn't make sense to initialize a ModelsArtifactRepository with only
      # the model name portion of the URI, then call download_artifacts with the version info.
      if ModelsArtifactRepository.is_models_uri(artifact_uri):
          (
              root_uri,
              artifact_path,
          ) = ModelsArtifactRepository.split_models_uri(artifact_uri)
      else:
          artifact_path = posixpath.basename(parsed_uri.path)
          parsed_uri = parsed_uri._replace(
              path=posixpath.dirname(parsed_uri.path)
          )
          root_uri = prefix + urllib.parse.urlunparse(parsed_uri)
      return root_uri, artifact_path
  
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 2 for calling a global function with example usage: _get_root_uri_and_artifact_path(artifact_uri) and returns: root_uri,  artifact_path, root_uri,  artifact_path