code: def testDuplicateNodeNamesInGraphDefOfSingleDeviceRaisesException(
      self,
  ):
      self._makeDataDirWithMultipleDevicesAndDuplicateNodeNames()
      graph_cpu_0 = graph_pb2.GraphDef()
      node = graph_cpu_0.node.add()
      node.name = "node_foo_1"
      node.op = "FooOp"
      node.device = "/job:localhost/replica:0/task:0/cpu:0"
      graph_gpu_0 = graph_pb2.GraphDef()
      node = graph_gpu_0.node.add()
      node.name = "node_foo_1"
      node.op = "FooOp"
      node.device = "/job:localhost/replica:0/task:0/device:GPU:0"
      graph_gpu_1 = graph_pb2.GraphDef()
      node = graph_gpu_1.node.add()
      node.name = "node_foo_1"
      node.op = "FooOp"
      node.device = "/job:localhost/replica:0/task:0/device:GPU:1"
      node = graph_gpu_1.node.add()  # Here is the duplicate.
      node.name = "node_foo_1"
      node.op = "FooOp"
      node.device = "/job:localhost/replica:0/task:0/device:GPU:1"
  
      with self.assertRaisesRegex(
          ValueError, r"Duplicate node name on device "
      ):
          debug_data.DebugDumpDir(
              self._dump_root,
              partition_graphs=[graph_cpu_0, graph_gpu_0, graph_gpu_1],
          )
  
imports: import os
  import platform
  import tempfile
  import numpy
  from tensorflow.core.framework import graph_pb2
  from tensorflow.core.framework import tensor_pb2
  from tensorflow.python.debug.lib import debug_data
  from tensorflow.python.framework import test_util
  from tensorflow.python.lib.io import file_io
  from tensorflow.python.platform import gfile
  from tensorflow.python.platform import googletest
  from tensorflow.python.platform import test
label_desc: Use image node_id 7 for calling the DebugDumpDirTest obj's underlying member method code with example usage: obj.testDuplicateNodeNamesInGraphDefOfSingleDeviceRaisesException() without return types