code: def prepend_name_scope(name, import_scope):
      """Prepends name scope to a name."""
      # Based on tensorflow/python/framework/ops.py implementation.
      if import_scope:
          try:
              str_to_replace = r"([\^]|loc:@|^)(.*)"
              return re.sub(
                  str_to_replace,
                  r"\1" + import_scope + r"/\2",
                  tf.compat.as_str_any(name),
              )
          except TypeError as e:
              # If the name is not of a type we can process, simply return it.
              logging.warning(e)
              return name
      else:
          return name
  
file_path: hub/tensorflow_hub/meta_graph_lib.py
imports: import re
  from absl import logging
  import tensorflow
label_desc: Use image node_id 1 for calling a global function with example usage: prepend_name_scope(name, import_scope) and returns: name, re, name