code: def _get_node_name_from_tensor(tensor_name):
      """tensor_name must have format node_name:output_number. Returns node_name."""
      result = re.match(r"([^:]*):\d+$", tensor_name)
      if not result:
          raise ValueError(
              "Unexpected format for tensor name. Expected node_name:output_number. "
              "Got %r" % tensor_name
          )
      return result.group(1)
  
imports: import collections
  import os
  import re
  from absl import logging
  import tensorflow
  from tensorflow_hub import module_attachment_pb2
  from tensorflow_hub import tf_utils
  from google.protobuf import message
  from tensorflow.core.protobuf import meta_graph_pb2
  from tensorflow.core.protobuf import saved_model_pb2
label_desc: Use image node_id 5 for calling a global function with example usage: _get_node_name_from_tensor(tensor_name) and returns: result