code: def _get_shape(x):
      """Gets tensor shape as a list, allowing mixing static and dynamic shapes."""
      dynamic_shape = tf.shape(x)
      if x.shape.ndims is None:
          return dynamic_shape
      static_shape = x.shape.as_list()
      shapes = [
          static_shape[i]
          if static_shape[i] is not None
          else dynamic_shape[i]
          for i in range(x.shape.ndims)
      ]
      return shapes
  
imports: import functools
  import math
  from typing import Optional
  from absl import logging
  from dmvr import builders
  from dmvr import processors
  import simclr.tf2.data_util
  import tensorflow
  from official.vision.image_classification import augment
label_desc: Use image node_id 1 for calling a global function with example usage: _get_shape(x) and returns: shapes, dynamic_shape