code: def get_tensor_name(tensor):
      """Returns name of the input tensor.
  
      Args:
        tensor: tf.Tensor
  
      Returns:
        str
      """
      parts = tensor.name.split(":")
      if len(parts) > 2:
          raise ValueError(
              "Tensor name invalid. Expect 0 or 1 colon, got {0}".format(
                  len(parts) - 1
              )
          )
  
      # To be consistent with the tensor naming scheme in tensorflow, we need
      # drop the ':0' suffix for the first tensor.
      if len(parts) > 1 and parts[1] != "0":
          return tensor.name
      return parts[0]
  
imports: import copy
  import datetime
  import sys
  from absl import logging
  import flatbuffers
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.core.protobuf import meta_graph_pb2
  from tensorflow.lite.python import conversion_metadata_schema_py_generated
  from tensorflow.lite.python import schema_py_generated
  from tensorflow.lite.python import schema_util
  from tensorflow.lite.python import tflite_keras_util
  from tensorflow.lite.python.op_hint import convert_op_hints_to_stubs
  from tensorflow.lite.python.op_hint import find_all_hinted_output_nodes
  from tensorflow.lite.tools import flatbuffer_utils
  from tensorflow.python.eager import function
  from tensorflow.python.framework import convert_to_constants
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import error_interpolation
  from tensorflow.python.grappler import tf_optimizer
  from tensorflow.python.training.saver import export_meta_graph
label_desc: Use image node_id 3 for calling a global function with example usage: get_tensor_name(tensor) and returns: parts, tensor