code: def fit(self, X, Y):
      import sklearn.multiclass
      import sklearn.neighbors
  
      estimator = sklearn.neighbors.KNeighborsClassifier(
          n_neighbors=self.n_neighbors, weights=self.weights, p=self.p
      )
  
      if len(Y.shape) == 2 and Y.shape[1] > 1:
          self.estimator = sklearn.multiclass.OneVsRestClassifier(
              estimator, n_jobs=1
          )
      else:
          self.estimator = estimator
  
      self.estimator.fit(X, Y)
      return self
  
file_path: auto-sklearn/autosklearn/pipeline/components/classification/k_nearest_neighbors.py
imports: from typing import Optional
  from ConfigSpace.configuration_space import ConfigurationSpace
  from ConfigSpace.hyperparameters import CategoricalHyperparameter, UniformIntegerHyperparameter
  from autosklearn.askl_typing import FEAT_TYPE_TYPE
  from autosklearn.pipeline.components.base import AutoSklearnClassificationAlgorithm
  from autosklearn.pipeline.constants import DENSE, PREDICTIONS, SPARSE, UNSIGNED_DATA
label_desc: Use image node_id 2 for calling the KNearestNeighborsClassifier obj's underlying member method code with example usage: obj.fit(X, Y) and returns: self