code: def test_required_and_optional(self):
      def foo(x, y, z=3):  # pylint: disable=unused-argument
          pass
  
      constraint = function_type.FunctionType.from_callable(foo)
      self.assertEqual(
          constraint,
          function_type.FunctionType(
              (
                  function_type.Parameter(
                      "x",
                      function_type.Parameter.POSITIONAL_OR_KEYWORD,
                      False,
                      None,
                  ),
                  function_type.Parameter(
                      "y",
                      function_type.Parameter.POSITIONAL_OR_KEYWORD,
                      False,
                      None,
                  ),
                  function_type.Parameter(
                      "z",
                      function_type.Parameter.POSITIONAL_OR_KEYWORD,
                      True,
                      None,
                  ),
              )
          ),
      )
      self.assertEqual(
          function_type.FunctionType.get_default_values(foo), {"z": 3}
      )
  
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 3 for calling the FunctionTypeTest obj's underlying member method code with example usage: obj.test_required_and_optional() without return types