code: def _helper_protoselect_euclidean_1knn(
      summariser: ProtoSelect,
      num_prototypes: int,
      eps: float,
      knn_kw: dict,
  ) -> Optional[KNeighborsClassifier]:
      """
      Helper function to fit a 1-KNN classifier on the prototypes returned by the `summariser`.
      Sets the epsilon radius to be used.
  
      Parameters
      ----------
      summariser
          Fitted `ProtoSelect` summariser.
      num_prototypes
          Number of requested prototypes.
      eps
          Epsilon radius to be set and used for the computation of prototypes.
      knn_kw
          Keyword arguments passed to `sklearn.neighbors.KNeighborsClassifier`. See parameters description:
          https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.KNeighborsClassifier.html
  
      Returns
      -------
      Fitted 1-KNN classifier with Euclidean distance metric.
      """
      # update summariser eps and get the summary
      summariser.eps = eps
      summary = summariser.summarise(num_prototypes=num_prototypes)
  
      # train 1-knn classifier
      X_protos, y_protos = (
          summary.data["prototypes"],
          summary.data["prototype_labels"],
      )
      if len(X_protos) == 0:
          return None
  
      # note that the knn_kw are updated in `cv_protoselect_euclidean` to define a 1-KNN with Euclidean distance
      knn = KNeighborsClassifier(**knn_kw)
      return knn.fit(X=X_protos, y=y_protos)
  
imports: import logging
  from copy import deepcopy
  from typing import Callable, Dict, List, Optional, Tuple, Union
  import matplotlib.pyplot
  import numpy
  from matplotlib.offsetbox import AnnotationBbox, OffsetImage
  from skimage.transform import resize
  from sklearn.model_selection import KFold
  from sklearn.neighbors import KNeighborsClassifier
  from tqdm import tqdm
  from alibi.api.defaults import DEFAULT_DATA_PROTOSELECT, DEFAULT_META_PROTOSELECT
  from alibi.api.interfaces import Explanation, FitMixin, Summariser
  from alibi.utils.distance import batch_compute_kernel_matrix
  from alibi.utils.kernel import EuclideanDistance
label_desc: Use image node_id 1 for calling a global function with example usage: _helper_protoselect_euclidean_1knn(summariser, num_prototypes, eps, knn_kw) and returns: knn, None