code: def get_incoming_shape(incoming):
      """Returns the incoming data shape"""
      if isinstance(incoming, tf.Tensor):
          return incoming.get_shape().as_list()
      elif type(incoming) in [np.array, np.ndarray, list, tuple]:
          return np.shape(incoming)
      else:
          raise Exception("Invalid incoming layer.")
  
imports: from __future__ import division, print_function, absolute_import
  import six
  import string
  import random
  import numpy
  import tensorflow.compat.v1
  from tensorflow.python import pywrap_tensorflow
  import tflearn.variables
label_desc: Use image node_id 3 for calling a global function with example usage: get_incoming_shape(incoming) and returns: incoming, np