code: def _standardize_data(data, col, whitten, flatten):
      if col is not None:
          data = data[col]
  
      # TODO: enable auto flattening
      # if data is tensor then flatten it first
      # if flatten and len(data) > 0 and hasattr(data[0], 'shape') and \
      #    utils.has_method(data[0], 'reshape'):
  
      #    data = [d.reshape((-1,)) for d in data]
  
      if whitten:
          data = StandardScaler().fit_transform(data)
      return data
  
imports: from sklearn.manifold import TSNE
  from sklearn.preprocessing import StandardScaler
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: _standardize_data(data, col, whitten, flatten) and returns: data