code: def testEagerOpAttributesAreCapture(self):
      instrument = _NumpyFunctionCallback()
      m = constant_op.constant([[1.0, -1.0], [0.0, 1.0]])
      x = constant_op.constant([[-2.0], [3.0]])
      op_callbacks.add_op_callback(instrument.callback)
      y = math_ops.matmul(m, x, transpose_a=True, transpose_b=False)
      self.assertAllClose(y, [[-2.0], [5.0]])
  
      self.assertEqual(len(instrument.eager_attrs), 1)
      self.assertIsInstance(instrument.eager_attrs[0], tuple)
      self.assertEqual(
          instrument.eager_attrs[0][
              instrument.eager_attrs[0].index("transpose_a") + 1
          ],
          True,
      )
      self.assertEqual(
          instrument.eager_attrs[0][
              instrument.eager_attrs[0].index("transpose_b") + 1
          ],
          False,
      )
      self.assertEqual(len(instrument.graph_attrs), 0)
  
imports: import threading
  import numpy
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.eager import backprop
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.eager import test
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import op_callbacks
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import script_ops
  from tensorflow.python.ops import sparse_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.util import compat
label_desc: Use image node_id 13 for calling the OpCallbacksTest obj's underlying member method code with example usage: obj.testEagerOpAttributesAreCapture() without return types