class_docstr: Base class for nearest neighbors estimators.
class_docstr_tok: ["Base","class","for","nearest","neighbors","estimators","."]
code: def __init__(
      self,
      n_neighbors=None,
      radius=None,
      algorithm="auto",
      leaf_size=30,
      metric="minkowski",
      p=2,
      metric_params=None,
      n_jobs=None,
  ):
      self.n_neighbors = n_neighbors
      self.radius = radius
      self.algorithm = algorithm
      self.leaf_size = leaf_size
      self.metric = metric
      self.metric_params = metric_params
      self.p = p
      self.n_jobs = n_jobs
  
imports: import itertools
  import numbers
  import warnings
  from abc import ABCMeta, abstractmethod
  from functools import partial
  from numbers import Integral, Real
  import numpy
  from joblib import effective_n_jobs
  from scipy.sparse import csr_matrix, issparse
  from ..base import BaseEstimator, MultiOutputMixin, is_classifier
  from ..exceptions import DataConversionWarning, EfficiencyWarning
  from ..metrics import DistanceMetric, pairwise_distances_chunked
  from ..metrics._pairwise_distances_reduction import ArgKmin, RadiusNeighbors
  from ..metrics.pairwise import PAIRWISE_DISTANCE_FUNCTIONS
  from ..utils import _to_object_array, check_array, gen_even_slices
  from ..utils._param_validation import Interval, StrOptions, validate_params
  from ..utils.fixes import parse_version, sp_base_version
  from ..utils.multiclass import check_classification_targets
  from ..utils.parallel import Parallel, delayed
  from ..utils.validation import check_is_fitted, check_non_negative
  from ._ball_tree import BallTree
  from ._kd_tree import KDTree
label_desc: Use image node_id 1 to create a new NeighborsBase object from inherited base classes: MultiOutputMixin, BaseEstimator with example: obj = NeighborsBase(n_neighbors, radius, algorithm, leaf_size, metric, p, metric_params, n_jobs)