class_docstr: Populates a mock MLMD database with Contexts, Artifacts and Excutions.
docstr: Put an Artifact in the MLMD database.
  
  Args:
    artifact_type: The artifact type. For example, "DummyArtifact".
    name: `Artifact.name`. Default not set.
    uri: `Artifact.uri`. Defaults to '/fake'.
    state: Artifact state. Default to LIVE.
    properties: The raw property values to insert in the Artifact. Example:
      {"span": 3, "version": 1}
    custom_properties: The raw custom property values to insert in the
      Artifact.
  
  Returns:
    The MLMD artifact.
code: def put_artifact(
      self,
      artifact_type: str,
      name: Optional[str] = None,
      uri: str = "/fake",
      state: Union[
          str, metadata_store_pb2.Artifact.State
      ] = metadata_store_pb2.Artifact.State.LIVE,
      properties: Optional[Dict[str, types.ExecPropertyTypes]] = None,
      custom_properties: Optional[
          Dict[str, types.ExecPropertyTypes]
      ] = None,
  ) -> metadata_store_pb2.Artifact:
      """Put an Artifact in the MLMD database.
  
      Args:
        artifact_type: The artifact type. For example, "DummyArtifact".
        name: `Artifact.name`. Default not set.
        uri: `Artifact.uri`. Defaults to '/fake'.
        state: Artifact state. Default to LIVE.
        properties: The raw property values to insert in the Artifact. Example:
          {"span": 3, "version": 1}
        custom_properties: The raw custom property values to insert in the
          Artifact.
  
      Returns:
        The MLMD artifact.
      """
      if artifact_type not in self._artifact_type_ids:
          if properties is not None:
              property_types = {
                  key: data_types_utils.get_metadata_value_type(value)
                  for key, value in properties.items()
              }
          else:
              property_types = None
          type_id = self.put_artifact_type(
              artifact_type, properties=property_types
          )
      else:
          type_id = self._artifact_type_ids[artifact_type]
  
      artifact = metadata_store_pb2.Artifact(
          type_id=type_id,
          name=name,
          uri=uri,
          state=state,
          properties=data_types_utils.build_metadata_value_dict(
              properties
          ),
          custom_properties=data_types_utils.build_metadata_value_dict(
              custom_properties
          ),
      )
      artifact_id = self.store.put_artifacts([artifact])[0]
      return self.store.get_artifacts_by_id([artifact_id])[0]
  
imports: from __future__ import annotations
  import contextlib
  import copy
  import os
  from typing import Dict, Iterable, Optional, Union, Mapping, Sequence, cast
  import unittest
  import tensorflow
  from tfx import types
  from tfx.dsl.io import fileio
  from tfx.orchestration import data_types_utils
  from tfx.orchestration import metadata
  from tfx.orchestration import mlmd_connection_manager
  from tfx.orchestration.portable.mlmd import event_lib
  from tfx.utils import io_utils
  from google.protobuf import message
  from google.protobuf import text_format
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 8 for calling the MlmdMixins obj's underlying member method code with example usage: obj.put_artifact(artifact_type, name, uri, state, properties, custom_properties) and returns: self