class_docstr: Wrapper used to make distance function work with KNNClassifier and
  KNNRegressor.
  
  The k-NN-based classifier and regressor store tuples with `(x, y)`, but only
  `x` is used for distance calculations. This wrapper makes sure `x` is accessed
  when calculating the distances.
  
  Parameters
  ----------
  distance_function
      The custom distance function to be wrapped.
class_docstr_tok: ["Wrapper","used","to","make","distance","function","work","with","KNNClassifier","and","KNNRegressor",".","The","k-NN-based","classifier","and","regressor","store","tuples","with","`","(","x",",","y",")","`",",","but","only","`","x","`","is","used","for","distance","calculations",".","This","wrapper","makes","sure","`","x","`","is","accessed","when","calculating","the","distances",".","Parameters","--","--","--","--","--","distance_function","The","custom","distance","function","to","be","wrapped","."]
code: def __call__(self, a, b):
      # Access x, which is stored in a tuple (x, y)
      return self.distance_function(a[0], b[0])
  
file_path: river/river/neighbors/base.py
imports: from __future__ import annotations
  import abc
  import typing
  from river import base
label_desc: Use image node_id 2 for calling the FunctionWrapper obj's underlying member method code with example usage: obj.__call__(a, b) and returns: self