class_docstr: Tests for ValueArtifact.
code: def testTypeAnnotation(self):
      annotation_class = _MyValueArtifact.annotate_as(MyDataset)
      self.assertEqual(
          annotation_class.__name__, "_MyValueArtifact_MyDataset"
      )
      self.assertEqual(
          annotation_class.TYPE_NAME, "MyValueTypeName_MyDataset"
      )
      self.assertEqual(
          annotation_class.TYPE_ANNOTATION.MLMD_SYSTEM_BASE_TYPE,
          MyDataset.MLMD_SYSTEM_BASE_TYPE,
      )
      self.assertEqual(
          annotation_class._get_artifact_type().base_type,
          MyDataset.MLMD_SYSTEM_BASE_TYPE,
      )
  
      # invalid annotation class
      with self.assertRaisesRegex(
          ValueError, "is not a subclass of SystemArtifact"
      ):
          _MyValueArtifact.annotate_as(value_artifact.ValueArtifact)
  
      # no argument
      annotation_class = _MyValueArtifact.annotate_as()
      self.assertEqual(annotation_class.__name__, "_MyValueArtifact")
  
imports: import json
  from unittest import mock
  import tensorflow
  from tfx.dsl.io import fileio
  from tfx.types import standard_artifacts
  from tfx.types import system_artifacts
  from tfx.types import value_artifact
  from google.protobuf import json_format
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 4 for calling the ValueArtifactTest obj's underlying member method code with example usage: obj.testTypeAnnotation() without return types