class_docstr: Basic implementation of nearest neighbors not relying on scikit-learn.
  
  `kneighbors_graph` is ignored and `metric` does not have any impact.
code: def fit(self, X, y=None):
      X = X.toarray() if sparse.issparse(X) else X
      self._kd_tree = KDTree(X)
      return self
  
imports: import inspect
  import pkgutil
  from importlib import import_module
  from operator import itemgetter
  from pathlib import Path
  import numpy
  from scipy import sparse
  from sklearn.base import BaseEstimator
  from sklearn.neighbors import KDTree
  from sklearn.utils._testing import ignore_warnings
label_desc: Use image node_id 2 for calling the _CustomNearestNeighbors obj's underlying member method code with example usage: obj.fit(X, y) and returns: self