code: def shape_from_data(data):
      err_msg = "could not determine shape from %s" % (type(data))
      if is_iter(data):
          if is_ktrain_dataset(data):
              return data.xshape()
          elif hasattr(data, "image_shape"):
              return (
                  data.image_shape
              )  # DirectoryIterator/DataFrameIterator
          elif hasattr(data, "x"):  # NumpyIterator
              return data.x.shape[1:]
          else:
              try:
                  return data[0][0].shape[1:]
              except:
                  raise Exception(err_msg)
      else:
          try:
              if type(data[0]) == list:  # BERT-style tuple
                  return data[0][0].shape
              else:
                  return data[0].shape  # standard tuple
          except:
              raise Exception(err_msg)
  
imports: from .imports import *
  from subprocess import Popen
label_desc: Use image node_id 18 for calling a global function with example usage: shape_from_data(data) and returns: data, data, data, data, data, data