code: def find_node_shape(
      tensor_name: str, graph_def: tf.compat.v1.GraphDef
  ) -> List[int]:
      """Find node shape for the given tensor name
  
      Args:
          tensor_name (str): name of the tensor
          graph_def (tf.compat.v1.GraphDef): TF GraphDef
  
      Raises:
          ValueError: When node name is not in the graph
  
      Returns:
          List[int]: tensor shape, excluding first (batch) dimension
      """
      tensor_name = tensor_name.split(":")[0]  # if :x is given
      shape = None
      for n in graph_def.node:
          if tensor_name in n.name:
              shape = [i.size for i in n.attr["shape"].shape.dim]
              break
      if shape is None:
          raise ValueError("No match node for %s" % tensor_name)
      return shape[1:]
  
file_path: auptimizer/src/aup/dlconvert/pb_to_tflite.py
imports: from os import path
  import logging
  from typing import List
  from absl import flags, app
  from tensorflow import lite, keras
  import tensorflow
  from .utils import reset_flag
  from .to_tflite import create_converter
  from .spec_utils import pb
label_desc: Use image node_id 3 for calling a global function with example usage: find_node_shape(tensor_name, graph_def) and returns: shape