code: def test_cnn_fit_resample_with_object(n_neighbors):
      cnn = CondensedNearestNeighbour(
          random_state=RND_SEED, n_neighbors=n_neighbors
      )
      X_resampled, y_resampled = cnn.fit_resample(X, Y)
  
      X_gt = np.array(
          [
              [-0.10903849, -0.12085181],
              [0.01936241, 0.17799828],
              [0.05230552, 0.09043907],
              [-1.25020462, -0.40402054],
              [0.70524765, 0.39816382],
              [0.35831463, 1.33483198],
              [-0.284881, -0.62730973],
              [0.03394306, 0.03986753],
              [-0.01252787, 0.34102657],
              [0.15198585, 0.12512646],
          ]
      )
      y_gt = np.array([0, 0, 1, 1, 1, 2, 2, 2, 2, 2])
      assert_array_equal(X_resampled, X_gt)
      assert_array_equal(y_resampled, y_gt)
  
      cnn = CondensedNearestNeighbour(
          random_state=RND_SEED, n_neighbors=1
      )
      X_resampled, y_resampled = cnn.fit_resample(X, Y)
      assert_array_equal(X_resampled, X_gt)
      assert_array_equal(y_resampled, y_gt)
  
file_path: imbalanced-learn/imblearn/under_sampling/_prototype_selection/tests/test_condensed_nearest_neighbour.py
imports: import numpy
  import pytest
  from sklearn.datasets import make_classification
  from sklearn.neighbors import KNeighborsClassifier
  from sklearn.utils._testing import assert_array_equal
  from imblearn.under_sampling import CondensedNearestNeighbour
label_desc: Use image node_id 3 for calling a global function with example usage: test_cnn_fit_resample_with_object(n_neighbors) without return types