code: def deserialize_artifact(
      artifact_type: metadata_store_pb2.ArtifactType,
      artifact: Optional[metadata_store_pb2.Artifact] = None,
  ) -> Artifact:
      """Reconstructs an Artifact object from MLMD proto descriptors.
  
      Internal method, no backwards compatibility guarantees.
  
      Args:
        artifact_type: A metadata_store_pb2.ArtifactType proto object describing the
          type of the artifact.
        artifact: A metadata_store_pb2.Artifact proto object describing the contents
          of the artifact. If not provided, an Artifact of the desired type with
          empty contents is created.
  
      Returns:
        Artifact subclass object for the given MLMD proto descriptors.
      """
      if artifact is None:
          artifact = metadata_store_pb2.Artifact()
      return deserialize_artifacts(artifact_type, [artifact])[0]
  
file_path: tfx/tfx/types/artifact_utils.py
imports: import itertools
  import json
  import os
  from typing import Dict, List, Optional, Type, Union
  from absl import logging
  from tfx.dsl.io import fileio
  from tfx.types import artifact
  from tfx.types import standard_artifact_utils
  from tfx.types import value_artifact
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 8 for calling a global function with example usage: deserialize_artifact(artifact_type, artifact) and returns: deserialize_artifacts