code: def a_chi(df, drop=None, lags=1, sample_steps=2):
      if drop:
          keep = df[drop]
          df = df.drop([drop], axis=1)
  
      df_2 = df.shift(lags)
      df = df.iloc[lags:, :]
      df_2 = df_2.dropna().reset_index(drop=True)
  
      chi2sampler = AdditiveChi2Sampler(sample_steps=sample_steps)
  
      df_2 = chi2sampler.fit_transform(df_2, df["Close"])
  
      df_2 = pd.DataFrame(df_2, index=df.index)
      df_2 = df.add_prefix("achi_")
  
      if drop:
          df = pd.concat([keep, df, df_2], axis=1)
      else:
          df = pd.concat([df, df_2], axis=1)
      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 3 for calling a global function with example usage: a_chi(df, drop, lags, sample_steps) and returns: df