code: def testDatasetMapTest(self):
      instrument = _NumpyFunctionCallback()
  
      op_callbacks.add_op_callback(instrument.callback)
  
      tensor = constant_op.constant(
          [0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0]
      )
  
      def map_fn(x):
          return math_ops.log(math_ops.square(x) + 1)
  
      dataset = (
          dataset_ops.Dataset.from_tensor_slices(tensor)
          .batch(2)
          .map(map_fn)
      )
      iterator = dataset_ops.make_one_shot_iterator(dataset)
  
      self.assertAllClose(iterator.next(), np.log([1.25, 2]))
      self.assertAllClose(iterator.next(), np.log([3.25, 5]))
  
      self.assertIn(_SQUARE_OP, instrument.graph_op_types)
      self.assertIn(_ADD_OP, instrument.graph_op_types)
      self.assertIn(_LOG_OP, instrument.graph_op_types)
      self.assertEqual(
          len(instrument.eager_op_types), len(instrument.eager_op_names)
      )
  
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 17 for calling the OpCallbacksTest obj's underlying member method code with example usage: obj.testDatasetMapTest() and returns: math_ops