code: def load_dict(artifact_uri: str) -> dict:
      """Loads the artifact contents as a dictionary.
  
      Args:
          artifact_uri: artifact location.
  
      Returns:
          A dictionary.
  
      .. code-block:: python
        :caption: Example
  
        import mlflow
  
        with mlflow.start_run() as run:
            artifact_uri = run.info.artifact_uri
            mlflow.log_dict({"mlflow-version": "0.28", "n_cores": "10"}, "config.json")
            config_json = mlflow.artifacts.load_dict(artifact_uri + "/config.json")
            print(config_json)
  
      .. code-block:: text
        :caption: Output
  
        {'mlflow-version': '0.28', 'n_cores': '10'}
      """
      with tempfile.TemporaryDirectory() as tmpdir:
          local_artifact = download_artifacts(
              artifact_uri, dst_path=tmpdir
          )
          with open(local_artifact) as local_artifact_fd:
              try:
                  return json.load(local_artifact_fd)
              except json.JSONDecodeError:
                  raise MlflowException(
                      "Unable to form a JSON 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 3 for calling a global function with example usage: load_dict(artifact_uri) and returns: json