code: def node_name_from_input(node_name: str) -> str:
      """Strips off ports and other decorations to get the underlying node name."""
      if node_name.startswith("^"):
          node_name = node_name[1:]
      m = re.search(r"(.*):\d+$", node_name)
      if m:
          node_name = m.group(1)
      return node_name
  
imports: import collections
  import math
  import re
  from typing import Mapping, Sequence
  import numpy
  from tensorflow.core.framework import attr_value_pb2
  from tensorflow.core.framework import graph_pb2
  from tensorflow.core.framework import node_def_pb2
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import graph_util
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.platform import flags
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.tools import strip_unused_lib
label_desc: Use image node_id 6 for calling a global function with example usage: node_name_from_input(node_name) and returns: node_name