code: def testCompositeClassSerialization(self):
      my_composite = MyCompositeClass(
          MyCustomClass(1, "name_1"),
          MyCustomClass(2, "name_2"),
          MyCustomClass(3, "name_3"),
      )
      serialized = serialization.serialize(my_composite)
  
      self.assertTrue(
          serialized.representation.Is(
              serialization_test_pb2.MyCompositeRepresentation.DESCRIPTOR
          )
      )
  
      proto = serialization_test_pb2.MyCompositeRepresentation()
      serialized.representation.Unpack(proto)
  
      self.assertEqual(
          proto.elements[0],
          serialization.serialize(MyCustomClass(1, "name_1")),
      )
      self.assertEqual(
          proto.elements[1],
          serialization.serialize(MyCustomClass(2, "name_2")),
      )
      self.assertEqual(
          proto.elements[2],
          serialization.serialize(MyCustomClass(3, "name_3")),
      )
  
imports: from tensorflow.core.function.trace_type import serialization
  from tensorflow.core.function.trace_type import serialization_test_pb2
  from tensorflow.python.platform import test
label_desc: Use image node_id 3 for calling the SerializeTest obj's underlying member method code with example usage: obj.testCompositeClassSerialization() without return types