code: def testParameter(self, name, kind, optional, type_contraint):
      original = function_type.Parameter(
          name, kind, optional, type_contraint
      )
      expected_type_constraint = (
          serialization.serialize(type_contraint)
          if type_contraint
          else None
      )
      expected = function_type_pb2.Parameter(
          name=name,
          kind=function_type.PY_TO_PROTO_ENUM[kind],
          is_optional=optional,
          type_constraint=expected_type_constraint,
      )
      self.assertEqual(original.to_proto(), expected)
      self.assertEqual(
          function_type.Parameter.from_proto(expected), original
      )
  
imports: import collections
  import pickle
  import platform
  from absl.testing import parameterized
  from tensorflow.core.function import trace_type
  from tensorflow.core.function.polymorphism import function_type
  from tensorflow.core.function.polymorphism import function_type_pb2
  from tensorflow.core.function.trace_type import serialization
  from tensorflow.python.framework import func_graph
  from tensorflow.python.platform import test
  from tensorflow.python.types import trace
label_desc: Use image node_id 1 for calling the SerializationTest obj's underlying member method code with example usage: obj.testParameter(name, kind, optional, type_contraint) without return types