code: def shape_list(x):
      """Return list of dims, statically where possible."""
      x = tf.convert_to_tensor(x)
  
      # If unknown rank, return dynamic shape
      if x.get_shape().dims is None:
          return tf.shape(x)
  
      static = x.get_shape().as_list()
      shape = tf.shape(x)
  
      ret = []
      for i, _ in enumerate(static):
          dim = static[i]
          if dim is None:
              dim = shape[i]
          ret.append(dim)
      return ret
  
imports: import os
  from absl import logging
  import numpy
  import delta.compat
  from tensorflow.python.client import device_lib
  from tensorflow.python.estimator.canned import metric_keys
  from tensorflow.python.util import nest
  from delta.utils.register import registers
label_desc: Use image node_id 1 for calling a global function with example usage: shape_list(x) and returns: ret, tf