code: def _name_scope_dry_run(name):
      """Constructs a scope like `tf.name_scope` but without marking it used."""
      if tf.executing_eagerly():
          # Names in eager mode are not unique, so we can just invoke name_scope
          # directly.
          with tf.name_scope(name) as name_scope:
              return name_scope
  
      graph = tf1.get_default_graph()
      if not name:
          name = ""
      elif name[-1] != "/":
          name = graph.unique_name(name, mark_as_used=False) + "/"
      return name
  
file_path: probability/tensorflow_probability/python/internal/name_util.py
imports: import contextlib
  import re
  import tensorflow.compat.v1
  import tensorflow.compat.v2
label_desc: Use image node_id 7 for calling a global function with example usage: _name_scope_dry_run(name) and returns: name, name_scope