code: def outlier_rejection(X, y):
      """This will be our function used to resample our dataset."""
      model = IsolationForest(
          max_samples=100, contamination=0.4, random_state=rng
      )
      model.fit(X)
      y_pred = model.predict(X)
      return X[y_pred == 1], y[y_pred == 1]
  
file_path: imbalanced-learn/examples/applications/plot_outlier_rejections.py
imports: import matplotlib.pyplot
  import numpy
  from sklearn.datasets import make_blobs, make_moons
  from sklearn.ensemble import IsolationForest
  from sklearn.linear_model import LogisticRegression
  from sklearn.metrics import classification_report
  from imblearn import FunctionSampler
  from imblearn.pipeline import make_pipeline
label_desc: Use image node_id 2 for calling a global function with example usage: outlier_rejection(X, y) and returns: X,  y