code: def load_image(artifact_uri: str):
      """Loads artifact contents as a ``PIL.Image.Image`` object
  
      Args:
          artifact_uri: Artifact location.
  
      Returns:
          A PIL.Image object.
  
      .. code-block:: python
          :caption: Example
  
          import mlflow
          from PIL import Image
  
          with mlflow.start_run() as run:
              image = Image.new("RGB", (100, 100))
              artifact_uri = run.info.artifact_uri
              mlflow.log_image(image, "image.png")
              image = mlflow.artifacts.load_image(artifact_uri + "/image.png")
              print(image)
  
      .. code-block:: text
          :caption: Output
  
          <PIL.PngImagePlugin.PngImageFile image mode=RGB size=100x100 at 0x11D2FA3D0>
      """
      try:
          from PIL import Image
      except ImportError as exc:
          raise ImportError(
              "`load_image` requires Pillow. Please install it via: pip install Pillow"
          ) from exc
  
      with tempfile.TemporaryDirectory() as tmpdir:
          local_artifact = download_artifacts(
              artifact_uri, dst_path=tmpdir
          )
          try:
              image_obj = Image.open(local_artifact)
              image_obj.load()
              return image_obj
          except Exception:
              raise MlflowException(
                  "Unable to form a PIL Image 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 4 for calling a global function with example usage: load_image(artifact_uri) and returns: image_obj