code: def testWrongProto(self):
      class ClassReturningWrongProto(serialization.Serializable):
          @classmethod
          def experimental_type_proto(cls):
              return serialization.SerializedTraceType
  
          @classmethod
          def experimental_from_proto(cls, proto):
              raise NotImplementedError
  
          def experimental_as_proto(self):
              return serialization_test_pb2.MyCustomRepresentation()
  
      with self.assertRaisesRegex(
          ValueError,
          (
              "ClassReturningWrongProto returned different type of proto than "
              "specified by experimental_type_proto()"
          ),
      ):
          serialization.serialize(ClassReturningWrongProto())
  
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 6 for calling the SerializeTest obj's underlying member method code with example usage: obj.testWrongProto() and returns: serialization, serialization_test_pb2