code: def load_text(artifact_uri: str) -> str:
      """Loads the artifact contents as a string.
  
      Args:
          artifact_uri: Artifact location.
  
      Returns:
          The contents of the artifact as a string.
  
      .. code-block:: python
          :caption: Example
  
          import mlflow
  
          with mlflow.start_run() as run:
              artifact_uri = run.info.artifact_uri
              mlflow.log_text("This is a sentence", "file.txt")
              file_content = mlflow.artifacts.load_text(artifact_uri + "/file.txt")
              print(file_content)
  
      .. code-block:: text
          :caption: Output
  
          This is a sentence
      """
      with tempfile.TemporaryDirectory() as tmpdir:
          local_artifact = download_artifacts(
              artifact_uri, dst_path=tmpdir
          )
          with open(local_artifact) as local_artifact_fd:
              try:
                  return str(local_artifact_fd.read())
              except Exception:
                  raise MlflowException(
                      "Unable to form a str object from file content",
                      BAD_REQUEST,
                  )
  
file_path: mlflow/mlflow/artifacts/__init__.py
imports: import json
  import pathlib
  import tempfile
  from typing import Optional
  from mlflow.exceptions import MlflowException
  from mlflow.protos.databricks_pb2 import BAD_REQUEST, INVALID_PARAMETER_VALUE
  from mlflow.tracking import _get_store
  from mlflow.tracking.artifact_utils import _download_artifact_from_uri, add_databricks_profile_info_to_artifact_uri, get_artifact_repository
label_desc: Use image node_id 2 for calling a global function with example usage: load_text(artifact_uri) and returns: str