code: def test_1NN(get_mats, get_targets):
      """Test KNearestNeighborRegressor with K=1"""
      n_matrices, n_channels = 9, 3
      covmats = get_mats(n_matrices, n_channels, "spd")
      targets = get_targets(n_matrices)
  
      knn = KNearestNeighborRegressor(1, metric="riemann")
      knn.fit(covmats, targets)
      preds = knn.predict(covmats[:-1])
      assert_array_equal(targets[:-1], preds)
  
imports: import pickle
  import numpy
  from numpy.testing import assert_array_equal
  import pytest
  from conftest import get_distances, get_means, get_metrics
  from pyriemann.regression import SVR, KNearestNeighborRegressor
  from pyriemann.utils.kernel import kernel
  from pyriemann.utils.mean import mean_covariance
label_desc: Use image node_id 6 for calling a global function with example usage: test_1NN(get_mats, get_targets) without return types