code: def _ValueArtifactType(  # pylint: disable=invalid-name
      mlmd_artifact_type: metadata_store_pb2.ArtifactType,
      base: Type[ValueArtifact],
  ) -> Type[ValueArtifact]:
      """Experimental interface: internal use only.
  
      Construct a value artifact type. Equivalent to subclassing ValueArtifact and
      providing relevant properties.
  
      Args:
        mlmd_artifact_type: A ML Metadata metadata_store_pb2.ArtifactType protobuf
          message corresponding to the type being created.
        base: base class of the created value artifact type. It is a subclass of
          ValueArtifact, for example, Integer, String.
  
      Returns:
        A ValueArtifact subclass corresponding to the specified type and base.
      """
  
      if not mlmd_artifact_type.name:
          raise ValueError(
              'ValueArtifact type proto must have "name" field set.'
          )
      if not (base and issubclass(base, ValueArtifact)):
          raise ValueError(
              'Input argumment "base" must be a subclass of ValueArtifact; got : %s.'
              % base
          )
      properties = {}
      for name, property_type in mlmd_artifact_type.properties.items():
          if property_type == metadata_store_pb2.PropertyType.INT:
              properties[name] = Property(PropertyType.INT)
          elif property_type == metadata_store_pb2.PropertyType.DOUBLE:
              properties[name] = Property(PropertyType.FLOAT)
          elif property_type == metadata_store_pb2.PropertyType.STRING:
              properties[name] = Property(PropertyType.STRING)
          else:
              raise ValueError(
                  "Unsupported MLMD property type: %s." % property_type
              )
      annotation = None
      if (
          mlmd_artifact_type.base_type
          != metadata_store_pb2.ArtifactType.UNSET
      ):
          extensions = (
              metadata_store_pb2.ArtifactType.SystemDefinedBaseType.DESCRIPTOR.values_by_number[
                  mlmd_artifact_type.base_type
              ]
              .GetOptions()
              .Extensions
          )
          mlmd_base_type_name = extensions[
              metadata_store_pb2.system_type_extension
          ].type_name
          annotation = type(
              mlmd_base_type_name,
              (SystemArtifact,),
              {
                  "MLMD_SYSTEM_BASE_TYPE": mlmd_artifact_type.base_type,
              },
          )
  
      return type(
          str(mlmd_artifact_type.name),
          (base,),
          {
              "TYPE_NAME": mlmd_artifact_type.name,
              "TYPE_ANNOTATION": annotation,
              "PROPERTIES": properties,
          },
      )
  
file_path: tfx/tfx/types/value_artifact.py
imports: import abc
  from typing import Any, Type, Optional
  from tfx.dsl.io import fileio
  from tfx.types.artifact import Artifact
  from tfx.types.artifact import Property
  from tfx.types.artifact import PropertyType
  from tfx.types.system_artifacts import SystemArtifact
  from tfx.utils import doc_controls
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 1 for calling a global function with example usage: _ValueArtifactType(mlmd_artifact_type, base) and returns: type