code: def test_incorrect_knn_ensemble_init():
      # test knn ensemble with aggregator passed as None raises exception
  
      with pytest.raises(ValueError) as err:
          KNN(k=[8, 9, 10], aggregator=None)
      assert str(err.value) == (
          "If `k` is a `np.ndarray`, `list` or `tuple`, "
          "the `aggregator` argument cannot be ``None``."
      )
  
file_path: alibi-detect/alibi_detect/od/tests/test__knn/test__knn.py
imports: import pytest
  import numpy
  import torch
  from alibi_detect.od._knn import KNN
  from alibi_detect.od.pytorch.ensemble import AverageAggregator, TopKAggregator, MaxAggregator, MinAggregator, ShiftAndScaleNormalizer, PValNormalizer
  from alibi_detect.exceptions import NotFittedError, ThresholdNotInferredError
  from sklearn.datasets import make_moons
label_desc: Use image node_id 5 for calling a global function with example usage: test_incorrect_knn_ensemble_init() without return types