code: def _compareOriginalAndReconstructedGraphDefs(
      self, sess, fetches, feed_dict=None, expected_output=None
  ):
      run_options = config_pb2.RunOptions(output_partition_graphs=True)
      run_metadata = config_pb2.RunMetadata()
      output = sess.run(
          fetches,
          feed_dict=feed_dict,
          options=run_options,
          run_metadata=run_metadata,
      )
      if expected_output is not None:
          self.assertAllClose(expected_output, output)
      non_debug_graph_defs = run_metadata.partition_graphs
  
      debug_utils.watch_graph(
          run_options, sess.graph, debug_urls=self._debug_url
      )
      run_metadata = config_pb2.RunMetadata()
      output = sess.run(
          fetches,
          feed_dict=feed_dict,
          options=run_options,
          run_metadata=run_metadata,
      )
      if expected_output is not None:
          self.assertAllClose(expected_output, output)
  
      dump = debug_data.DebugDumpDir(
          self._dump_dir,
          partition_graphs=run_metadata.partition_graphs,
          validate=True,
      )
      reconstructed = dump.reconstructed_non_debug_partition_graphs()
  
      self.assertEqual(len(non_debug_graph_defs), len(reconstructed))
      for i, non_debug_graph_def in enumerate(non_debug_graph_defs):
          device_name = debug_graphs._infer_device_name(
              non_debug_graph_def
          )
          test_util.assert_equal_graph_def(
              self._graphDefWithoutDenylistedNodes(
                  reconstructed[device_name]
              ),
              self._graphDefWithoutDenylistedNodes(non_debug_graph_def),
          )
  
          # Test debug_graphs.reconstruct_non_debug_graph_def.
          reconstructed_again = (
              debug_graphs.reconstruct_non_debug_graph_def(
                  run_metadata.partition_graphs[i]
              )
          )
          test_util.assert_equal_graph_def(
              self._graphDefWithoutDenylistedNodes(reconstructed_again),
              self._graphDefWithoutDenylistedNodes(non_debug_graph_def),
          )
  
imports: import tempfile
  from tensorflow.core.framework import graph_pb2
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.core.protobuf import rewriter_config_pb2
  from tensorflow.python.client import session
  from tensorflow.python.debug.lib import debug_data
  from tensorflow.python.debug.lib import debug_graphs
  from tensorflow.python.debug.lib import debug_utils
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.lib.io import file_io
  from tensorflow.python.ops import cond
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.ops import while_loop
  from tensorflow.python.platform import test
  from tensorflow.python.training import gradient_descent
label_desc: Use image node_id 5 for calling the ReconstructNonDebugGraphTest obj's underlying member method code with example usage: obj._compareOriginalAndReconstructedGraphDefs(sess, fetches, feed_dict, expected_output) without return types