class_docstr: Tests for recognizable export signatures from concrete functions.
class_docstr_tok: ["Tests","for","recognizable","export","signatures","from","concrete","functions","."]
code: def testDictReturned(self):
      @polymorphic_function.function
      def fn(x, z=(1.0, 2.0), y=3.0):
          z1, z2 = z
          return {"alpha": x + y + z1, "beta": x * y + z2}
  
      # Call the function to make def_function happy
      fn(array_ops.ones([]))
  
      fn_op = fn.get_concrete_function(
          x=tensor_spec.TensorSpec(shape=(None,), dtype=dtypes.float32),
          y=tensor_spec.TensorSpec(shape=(), dtype=dtypes.float32),
      )
      self.assertEqual(
          ["x", "y"], [inp.op.name for inp in fn_op.inputs]
      )
      self.assertEqual(
          [b"x", b"y"],
          [
              inp.op.get_attr("_user_specified_name")
              for inp in fn_op.inputs
          ],
      )
      self.assertEqual(
          {"alpha", "beta"}, set(fn_op.graph.structured_outputs.keys())
      )
  
      fn_op2 = fn.get_concrete_function(
          z=(
              tensor_spec.TensorSpec(
                  shape=(None,), dtype=dtypes.float32, name="z_first"
              ),
              tensor_spec.TensorSpec(
                  shape=(), dtype=dtypes.float32, name="z_second"
              ),
          ),
          y=tensor_spec.TensorSpec(
              shape=(), dtype=dtypes.float32, name="custom"
          ),
          x=4.0,
      )
      self.assertEqual(
          ["z_first", "z_second", "custom"],
          [inp.op.name for inp in fn_op2.inputs],
      )
      self.assertEqual(
          [b"z_first", b"z_second", b"custom"],
          [
              inp.op.get_attr("_user_specified_name")
              for inp in fn_op2.inputs
          ],
      )
  
      fn_op3 = fn.get_concrete_function(
          tensor_spec.TensorSpec(
              shape=(), dtype=dtypes.float32, name="custom"
          ),
          z=(
              tensor_spec.TensorSpec(
                  shape=(None,), dtype=dtypes.float32, name="z1"
              ),
              tensor_spec.TensorSpec(
                  shape=(), dtype=dtypes.float32, name="z2"
              ),
          ),
          y=tensor_spec.TensorSpec(shape=(), dtype=dtypes.float32),
      )
      self.assertEqual(
          ["custom", "z1", "z2", "y"],
          [inp.op.name for inp in fn_op3.inputs],
      )
      self.assertEqual(
          [b"custom", b"z1", b"z2", b"y"],
          [
              inp.op.get_attr("_user_specified_name")
              for inp in fn_op3.inputs
          ],
      )
  
imports: from absl.testing import parameterized
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.python.eager.polymorphic_function import polymorphic_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
label_desc: Use image node_id 3 for calling the ArgumentNamingTests obj's underlying member method code with example usage: obj.testDictReturned() and returns: dict