code: def test_alknn_not_good_object():
      nn = "rnd"
      allknn = AllKNN(n_neighbors=nn, kind_sel="mode")
      with pytest.raises(ValueError):
          allknn.fit_resample(X, Y)
  
file_path: imbalanced-learn/imblearn/under_sampling/_prototype_selection/tests/test_allknn.py
imports: import numpy
  import pytest
  from sklearn.datasets import make_classification
  from sklearn.neighbors import NearestNeighbors
  from sklearn.utils._testing import assert_allclose, assert_array_equal
  from imblearn.under_sampling import AllKNN
label_desc: Use image node_id 5 for calling a global function with example usage: test_alknn_not_good_object() without return types