code: def feature_agg(df, drop=None, components=4):
      if drop:
          keep = df[drop]
          df = df.drop(drop, axis=1)
  
      components = min(df.shape[1] - 1, components)
      agglo = cluster.FeatureAgglomeration(n_clusters=components)
      agglo.fit(df)
      df = pd.DataFrame(agglo.transform(df), index=df.index)
      df = df.add_prefix("feagg_")
  
      if drop:
          return pd.concat((keep, df), axis=1)
      else:
          return df
  
file_path: deltapy/deltapy/mapper.py
imports: from sklearn.decomposition import PCA, IncrementalPCA, KernelPCA
  from sklearn.kernel_approximation import AdditiveChi2Sampler
  from sklearn.cross_decomposition import CCA
  from sklearn.manifold import LocallyLinearEmbedding
  from sklearn.preprocessing import minmax_scale
  from sklearn import datasets, cluster
  from sklearn.neighbors import NearestNeighbors
  import numpy
  import pandas
  import tensorflow
label_desc: Use image node_id 6 for calling a global function with example usage: feature_agg(df, drop, components) and returns: pd, df