code: def testArtifactTypeFunctionAndProto(self):
      # Test usage of _MyArtifact2 and _MyArtifact3, which were defined using the
      # _ArtifactType function.
      types_and_names = [
          (_MyArtifact2, "MyTypeName2"),
          (_MyArtifact3, "MyTypeName3"),
      ]
      for type_cls, name in types_and_names:
          self.assertEqual(type_cls.TYPE_NAME, name)
          my_artifact = type_cls()
          self.assertEqual(0, my_artifact.int1)
          self.assertEqual(0, my_artifact.int2)
          my_artifact.int1 = 111
          my_artifact.int2 = 222
          self.assertEqual(0.0, my_artifact.float1)
          self.assertEqual(0.0, my_artifact.float2)
          my_artifact.float1 = 111.1
          my_artifact.float2 = 222.2
          self.assertIsNone(my_artifact.proto1)
          self.assertIsNone(my_artifact.proto2)
          my_artifact.proto1 = struct_pb2.Value(string_value="pb1")
          my_artifact.proto2 = struct_pb2.Value(null_value=0)
          self.assertEqual("", my_artifact.string1)
          self.assertEqual("", my_artifact.string2)
          my_artifact.string1 = "111"
          my_artifact.string2 = "222"
          self.assertEqual(False, my_artifact.bool1)
          my_artifact.bool1 = True
          self.assertEqual(my_artifact.int1, 111)
          self.assertEqual(my_artifact.int2, 222)
          self.assertEqual(my_artifact.float1, 111.1)
          self.assertEqual(my_artifact.float2, 222.2)
          self.assertEqual(my_artifact.string1, "111")
          self.assertEqual(my_artifact.string2, "222")
          self.assertEqual(my_artifact.bool1, True)
          self.assertProtoEquals(
              my_artifact.proto1, struct_pb2.Value(string_value="pb1")
          )
          self.assertProtoEquals(
              my_artifact.proto2, struct_pb2.Value(null_value=0)
          )
  
imports: import json
  import textwrap
  from unittest import mock
  from absl import logging
  import tensorflow
  from tfx.types import artifact
  from tfx.types import system_artifacts
  from tfx.types import value_artifact
  from tfx.utils import json_utils
  from google.protobuf import struct_pb2
  from google.protobuf import json_format
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 2 for calling the ArtifactTest obj's underlying member method code with example usage: obj.testArtifactTypeFunctionAndProto() without return types