code: def test_knn_bounding_matrix(distance_key):
      """Test knn with custom bounding parameters."""
      X_train, y_train = load_unit_test(split="train", return_X_y=True)
      X_test, y_test = load_unit_test(split="test", return_X_y=True)
      knn = KNeighborsTimeSeriesClassifier(
          distance=distance_key, distance_params={"window": 0.5}
      )
      knn.fit(X_train, y_train)
      pred = knn.predict(X_test)
      correct = 0
      for j in range(0, len(pred)):
          if pred[j] == y_test[j]:
              correct = correct + 1
      assert correct == expected_correct_window[distance_key]
  
file_path: sktime/sktime/classification/distance_based/tests/test_time_series_neighbors.py
imports: import numpy
  import pandas
  import pytest
  from sktime.alignment.dtw_python import AlignerDTW
  from sktime.classification.distance_based._time_series_neighbors import KNeighborsTimeSeriesClassifier
  from sktime.datasets import load_unit_test
  from sktime.tests.test_switch import run_test_for_class
  from sktime.utils.validation._dependencies import _check_estimator_deps
label_desc: Use image node_id 2 for calling a global function with example usage: test_knn_bounding_matrix(distance_key) without return types