code: def testParseNamesWithDeviceNamePrefixWithoutDebugOpSuffix(self):
      (
          device_name,
          node_name,
          output_slot,
          debug_op,
          exec_index,
      ) = evaluator._parse_debug_tensor_name(
          "/job:ps/replica:0/task:2/cpu:0:foo:1"
      )
      self.assertEqual("/job:ps/replica:0/task:2/cpu:0", device_name)
      self.assertEqual("foo", node_name)
      self.assertEqual(1, output_slot)
      self.assertEqual("DebugIdentity", debug_op)
      self.assertEqual(0, exec_index)
  
      (
          device_name,
          node_name,
          output_slot,
          debug_op,
          exec_index,
      ) = evaluator._parse_debug_tensor_name(
          "/job:worker/replica:0/task:3/gpu:0:hidden_0/Weights:0"
      )
      self.assertEqual(
          "/job:worker/replica:0/task:3/gpu:0", device_name
      )
      self.assertEqual("hidden_0/Weights", node_name)
      self.assertEqual(0, output_slot)
      self.assertEqual("DebugIdentity", debug_op)
      self.assertEqual(0, exec_index)
  
imports: import numpy
  from tensorflow.python.debug.cli import evaluator
  from tensorflow.python.debug.lib import debug_data
  from tensorflow.python.framework import test_util
  from tensorflow.python.platform import test
label_desc: Use image node_id 3 for calling the ParseDebugTensorNameTest obj's underlying member method code with example usage: obj.testParseNamesWithDeviceNamePrefixWithoutDebugOpSuffix() without return types