code: def testGraphOpConsumingRelationIsCaptured(self, tensor_debug_mode):
      x = constant_op.constant([2.0, 2.0])
      y = constant_op.constant([3.0, 3.0])
      writer = dumping_callback.enable_dump_debug_info(
          self.dump_root, tensor_debug_mode=tensor_debug_mode
      )
  
      @def_function.function
      def log_sum(x, y):
          return math_ops.log(x + y)
  
      @def_function.function
      def maxindex_sin1p_log_sum(x, y):
          _, indices = array_ops.unique(
              math_ops.sin(1.0 + log_sum(x, y))
          )
          return math_ops.reduce_max(indices)
  
      maxindex = maxindex_sin1p_log_sum(x, y)
      self.assertAllEqual(maxindex, 0)
      writer.FlushNonExecutionFiles()
      writer.FlushExecutionFiles()
  
      with debug_events_reader.DebugDataReader(
          self.dump_root
      ) as reader:
          reader.update()
          traces = reader.graph_execution_traces()
          add_traces = [
              trace for trace in traces if trace.op_type == "AddV2"
          ]
          log_traces = [
              trace for trace in traces if trace.op_type == "Log"
          ]
          sin_traces = [
              trace for trace in traces if trace.op_type == "Sin"
          ]
          unique_traces = [
              trace for trace in traces if trace.op_type == "Unique"
          ]
          max_traces = [
              trace for trace in traces if trace.op_type == "Max"
          ]
          self.assertLen(add_traces, 2)
          self.assertLen(log_traces, 1)
          self.assertLen(sin_traces, 1)
          self.assertLen(
              unique_traces, 2
          )  # The Unique op outputs two tensors.
          self.assertLen(max_traces, 1)
          graph = reader.graph_by_id(add_traces[0].graph_id)
          # The first AddV2 op is consumed by the Log op.
          self.assertEqual(
              graph.get_op_consumers(add_traces[0].op_name),
              [(0, log_traces[0].op_name, 0)],
          )
          graph = reader.graph_by_id(add_traces[1].graph_id)
          # The second AddV2 op is consumed by the Sin op.
          self.assertEqual(
              graph.get_op_consumers(add_traces[1].op_name),
              [(0, sin_traces[0].op_name, 0)],
          )
          # The last Sin op is consumed by the Unique op.
          self.assertEqual(
              graph.get_op_consumers(sin_traces[0].op_name),
              [(0, unique_traces[0].op_name, 0)],
          )
          # The Unique op's 2nd output tensor is consumed by the Max op.
          self.assertEqual(
              graph.get_op_consumers(unique_traces[0].op_name),
              [(1, max_traces[0].op_name, 0)],
          )
  
imports: import collections
  import os
  import shutil
  import socket
  import tempfile
  import threading
  from absl.testing import parameterized
  import numpy
  from tensorflow.core.protobuf import debug_event_pb2
  from tensorflow.python.debug.lib import debug_events_reader
  from tensorflow.python.debug.lib import dumping_callback
  from tensorflow.python.debug.lib import dumping_callback_test_lib
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_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 test_util
  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 googletest
  from tensorflow.python.platform import test
  from tensorflow.python.platform import tf_logging
label_desc: Use image node_id 15 for calling the DumpingCallbackTest obj's underlying member method code with example usage: obj.testGraphOpConsumingRelationIsCaptured(tensor_debug_mode) and returns: math_ops, math_ops