code: def testParseMalformedDebugTensorName(self):
      with self.assertRaisesRegex(
          ValueError,
          r"The debug tensor name in the to-be-evaluated expression is "
          r"malformed:",
      ):
          evaluator._parse_debug_tensor_name(
              "/job:ps/replica:0/task:2/cpu:0:foo:1:DebugNanCount:1337"
          )
  
      with self.assertRaisesRegex(
          ValueError,
          r"The debug tensor name in the to-be-evaluated expression is "
          r"malformed:",
      ):
          evaluator._parse_debug_tensor_name(
              "/job:ps/replica:0/cpu:0:foo:1:DebugNanCount"
          )
  
      with self.assertRaises(ValueError):
          evaluator._parse_debug_tensor_name("foo:1:DebugNanCount[]")
  
      with self.assertRaises(ValueError):
          evaluator._parse_debug_tensor_name("foo:1[DebugNanCount]")
  
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 5 for calling the ParseDebugTensorNameTest obj's underlying member method code with example usage: obj.testParseMalformedDebugTensorName() without return types