docstr: Get the op info of an op with no consumers in the same graph.
docstr_tok: ["Get","the","op","info","of","an","op","with","no","consumers","in","the","same","graph","."]
code: def testServeGraphOpInfoForOpWithNoConsumers(self):
      """Get the op info of an op with no consumers in the same graph."""
      _generate_tfdbg_v2_data(self.logdir)
      run = self._getExactlyOneRun()
      # First, look up the graph_id and name of the Iendity op in the
      # unstack_and_sum() graph. The Identity op marks the return value of
      # the tf.function and hence has no consumer.
      response = self.server.get(
          _ROUTE_PREFIX + "/graph_execution/digests?run=%s" % run
      )
      data = json.loads(response.get_data())
      digests = data["graph_execution_digests"]
      op_types = [digest["op_type"] for digest in digests]
      add_index_0 = op_types.index("AddV2")
      graph_id = digests[add_index_0]["graph_id"]
      # Actually query the /graphs/op_info route.
      response = self.server.get(
          _ROUTE_PREFIX
          + "/graphs/op_info?run=%s&graph_id=%s&op_name=%s"
          % (run, graph_id, "Identity")
      )
      self.assertEqual(response.status_code, 200)
      data = json.loads(response.get_data())
  
      # Check op's self properties.
      self.assertEqual(data["op_type"], "Identity")
      self.assertEqual(data["op_name"], "Identity")
      # TODO(cais): Assert on detailed device name when available.
      self.assertIn("device_name", data)
      # The op is inside a nested tf.function, so its graph stack must have a height > 1.
      self.assertGreater(len(data["graph_ids"]), 1)
      self.assertEqual(data["graph_ids"][-1], graph_id)
      self.assertNotIn("input_names", data)
      self.assertEqual(data["num_outputs"], 1)
      self.assertEqual(data["host_name"], _HOST_NAME)
      self.assertTrue(data["stack_frame_ids"])
  
      # Check input op properties.
      self.assertLen(data["inputs"], 1)
      self.assertTrue(data["inputs"][0]["op_name"])
      self.assertIsInstance(data["inputs"][0]["op_name"], str)
      self.assertEqual(data["inputs"][0]["output_slot"], 0)
      input0 = data["inputs"][0]["data"]
      self.assertEqual(input0["op_type"], "AddV2")
  
      # Check consumers: There should be no consumers for this Identity op.
      self.assertEqual(data["consumers"], [[]])
  
imports: import collections
  import json
  import os
  import socket
  import threading
  import tensorflow
  from werkzeug import test
  from werkzeug import wrappers
  from tensorboard.backend import application
  from tensorboard.plugins import base_plugin
  from tensorboard.plugins.debugger_v2 import debug_data_multiplexer
  from tensorboard.plugins.debugger_v2 import debugger_v2_plugin
label_desc: Use image node_id 36 for calling the DebuggerV2PluginTest obj's underlying member method code with example usage: obj.testServeGraphOpInfoForOpWithNoConsumers() without return types