code: def plot_resampling(X, y, sampler, ax, title=None):
      X_res, y_res = sampler.fit_resample(X, y)
      ax.scatter(
          X_res[:, 0], X_res[:, 1], c=y_res, alpha=0.8, edgecolor="k"
      )
      if title is None:
          title = f"Resampling with {sampler.__class__.__name__}"
      ax.set_title(title)
      sns.despine(ax=ax, offset=10)
  
file_path: imbalanced-learn/examples/under-sampling/plot_comparison_under_sampling.py
imports: import seaborn
  from sklearn.datasets import make_classification
  import numpy
  from sklearn.linear_model import LogisticRegression
  import matplotlib.pyplot
  from sklearn.cluster import MiniBatchKMeans
  from imblearn import FunctionSampler
  from imblearn.pipeline import make_pipeline
  from imblearn.under_sampling import ClusterCentroids
  from imblearn.under_sampling import RandomUnderSampler
  from imblearn.under_sampling import NearMiss
  from imblearn.under_sampling import AllKNN, EditedNearestNeighbours, RepeatedEditedNearestNeighbours
  from imblearn.under_sampling import CondensedNearestNeighbour, NeighbourhoodCleaningRule, OneSidedSelection
  from imblearn.under_sampling import InstanceHardnessThreshold
label_desc: Use image node_id 2 for calling a global function with example usage: plot_resampling(X, y, sampler, ax, title) without return types