class_docstr: Tests for recognizable export signatures from concrete functions.
class_docstr_tok: ["Tests","for","recognizable","export","signatures","from","concrete","functions","."]
code: def testMethodSignature(self):
      class HasMethod(object):
          @polymorphic_function.function(
              input_signature=(
                  tensor_spec.TensorSpec(
                      shape=None, dtype=dtypes.float64, name="y"
                  ),
              )
          )
          def method(self, x):
              hash(self)  # No weak proxies passed as `self`
              return x
  
      has_method = HasMethod()
      # Call the function to make def_function happy
      has_method.method(array_ops.ones([], dtype=dtypes.float64))
      method_op = has_method.method.get_concrete_function()
      self.assertEqual(["y"], [inp.op.name for inp in method_op.inputs])
      self.assertEqual(
          [b"y"],
          [
              inp.op.get_attr("_user_specified_name")
              for inp in method_op.inputs
          ],
      )
      method_op2 = has_method.method.get_concrete_function()
      self.assertEqual(
          ["y"], [inp.op.name for inp in method_op2.inputs]
      )
      self.assertEqual(
          [b"y"],
          [
              inp.op.get_attr("_user_specified_name")
              for inp in method_op2.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 5 for calling the ArgumentNamingTests obj's underlying member method code with example usage: obj.testMethodSignature() and returns: x