code: def testWatchGraph_nodeNameAllowlist(self):
      debug_utils.watch_graph(
          self._run_options,
          self._graph,
          debug_urls="file:///tmp/tfdbg_1",
          node_name_regex_allowlist="(a1$|a1_init$|a1/.*|p1$)",
      )
  
      node_names = self._verify_watches(
          self._run_options.debug_options.debug_tensor_watch_opts,
          0,
          ["DebugIdentity"],
          ["file:///tmp/tfdbg_1"],
      )
      self.assertEqual(
          sorted(["a1_init", "a1", "a1/Assign", "a1/read", "p1"]),
          sorted(node_names),
      )
  
imports: import numpy
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.python.client import session
  from tensorflow.python.debug.lib import debug_utils
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import variable_v1
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 9 for calling the DebugUtilsTest obj's underlying member method code with example usage: obj.testWatchGraph_nodeNameAllowlist() without return types