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 __init__(self, n_neighbors=1, metric="euclidean"):
      self.n_neighbors = n_neighbors
      self.metric = metric
  
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 1 to create a new _CustomNearestNeighbors object from inherited base classes: BaseEstimator with example: obj = _CustomNearestNeighbors(n_neighbors, metric)