code: def _get_shape_tuple(t):
      if hasattr(t, "shape"):
          shape = t.shape
          if isinstance(shape, tuple):
              return shape
          if shape.rank is not None:
              return tuple(shape.as_list())
          return None
      return None
  
imports: import copy
  import warnings
  from tensorflow.python import tf2
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.keras import layers
  from tensorflow.python.keras.engine import base_layer
  from tensorflow.python.keras.engine import functional
  from tensorflow.python.keras.engine import input_layer
  from tensorflow.python.keras.engine import training_utils
  from tensorflow.python.keras.saving.saved_model import model_serialization
  from tensorflow.python.keras.utils import generic_utils
  from tensorflow.python.keras.utils import layer_utils
  from tensorflow.python.keras.utils import tf_inspect
  from tensorflow.python.keras.utils import tf_utils
  from tensorflow.python.module import module
  from tensorflow.python.ops.numpy_ops import np_arrays
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.trackable import base
  from tensorflow.python.util import nest
label_desc: Use image node_id 1 for calling a global function with example usage: _get_shape_tuple(t) and returns: None, None, shape, tuple