code: def test_ncr_n_neighbors(data):
      """Check the effect of the NN on the cleaning of the second phase."""
      X, y = data
  
      enn = EditedNearestNeighbours()
      ncr = NeighbourhoodCleaningRule(
          edited_nearest_neighbours=enn, n_neighbors=3
      )
  
      ncr.fit_resample(X, y)
      sample_indices_3_nn = ncr.sample_indices_
  
      ncr.set_params(n_neighbors=10).fit_resample(X, y)
      sample_indices_10_nn = ncr.sample_indices_
  
      # we should have a more aggressive cleaning with n_neighbors is larger
      assert len(sample_indices_3_nn) > len(sample_indices_10_nn)
  
file_path: imbalanced-learn/imblearn/under_sampling/_prototype_selection/tests/test_neighbourhood_cleaning_rule.py
imports: from collections import Counter
  import numpy
  import pytest
  from sklearn.datasets import make_classification
  from sklearn.utils._testing import assert_array_equal
  from imblearn.under_sampling import EditedNearestNeighbours, NeighbourhoodCleaningRule
label_desc: Use image node_id 3 for calling a global function with example usage: test_ncr_n_neighbors(data) without return types