code: def neigh_feat(df, drop, neighbors=6):
      if drop:
          keep = df[drop]
          df = df.drop(drop, axis=1)
  
      components = min(df.shape[0] - 1, neighbors)
      neigh = NearestNeighbors(n_neighbors=neighbors)
      neigh.fit(df)
      neigh = neigh.kneighbors()[0]
      df = pd.DataFrame(neigh, index=df.index)
      df = df.add_prefix("neigh_")
  
      if drop:
          return pd.concat((keep, df), axis=1)
      else:
          return df
  
      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 7 for calling a global function with example usage: neigh_feat(df, drop, neighbors) and returns: df, pd, df