docstr: Fit the model using X as training data
  
  Parameters
  ----------
  X : {array-like, sparse matrix, BallTree, KDTree}
      Training data. If array or matrix, shape [n_samples, n_features],
      or [n_samples, n_samples] if metric='precomputed'.
docstr_tok: ["Fit","the","model","using","X","as","training","data","Parameters","--","--","--","--","--","X",":","{","array-like",",","sparse","matrix",",","BallTree",",","KDTree","}","Training","data",".","If","array","or","matrix",",","shape","[","n_samples",",","n_features","]",",","or","[","n_samples",",","n_samples","]","if","metric='precomputed","'","."]
code: def fit(self, X, y=None):
      """Fit the model using X as training data
  
      Parameters
      ----------
      X : {array-like, sparse matrix, BallTree, KDTree}
          Training data. If array or matrix, shape [n_samples, n_features],
          or [n_samples, n_samples] if metric='precomputed'.
      """
      return self._fit(X)
  
imports: import warnings
  from abc import ABCMeta, abstractmethod
  import numpy
  from scipy.sparse import csr_matrix, issparse
  from .ball_tree import BallTree
  from .kd_tree import KDTree
  from ..base import BaseEstimator
  from ..metrics import pairwise_distances
  from ..metrics.pairwise import PAIRWISE_DISTANCE_FUNCTIONS
  from ..utils import check_X_y, check_array, _get_n_jobs, gen_even_slices
  from ..utils.fixes import argpartition
  from ..utils.multiclass import check_classification_targets
  from ..externals import six
  from ..externals.joblib import Parallel, delayed
  from ..exceptions import NotFittedError
  from ..exceptions import DataConversionWarning
label_desc: Use image node_id 1 for calling the UnsupervisedMixin obj's underlying member method code with example usage: obj.fit(X, y) and returns: self