docstr: Fit the model using X as training data
  
  Parameters
  ----------
  X : {array-like, tensor, BallTree, KDTree}
      Training data. If tensor, 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",",","tensor",",","BallTree",",","KDTree","}","Training","data",".","If","tensor",",","shape","[","n_samples",",","n_features","]",",","or","[","n_samples",",","n_samples","]","if","metric='precomputed","'","."]
code: def fit(self, X, y=None, session=None, run_kwargs=None):
      """Fit the model using X as training data
  
      Parameters
      ----------
      X : {array-like, tensor, BallTree, KDTree}
          Training data. If tensor, shape [n_samples, n_features],
          or [n_samples, n_samples] if metric='precomputed'.
      """
      return self._fit(X, session=session, run_kwargs=run_kwargs)
  
imports: import warnings
  from abc import ABCMeta, abstractmethod
  import numpy
  from sklearn.base import BaseEstimator, MultiOutputMixin
  from ...None import tensor
  from ...tensor.reshape.reshape import _reshape
  from ..metrics.pairwise import PAIRWISE_DISTANCE_FUNCTIONS
  from ..metrics import pairwise_distances_topk
  from ..utils import check_array
  from ..utils.validation import check_is_fitted
  from ._ball_tree import create_ball_tree, ball_tree_query, SklearnBallTree
  from ._kd_tree import create_kd_tree, kd_tree_query, SklearnKDTree
  from ._faiss import build_faiss_index, faiss_query, METRIC_TO_FAISS_METRIC_TYPE
  from ._proxima import build_proxima_index, proxima_query, METRIC_TO_PROXIMA_METRIC_TYPE
  from ._kneighbors_graph import KNeighborsGraph
label_desc: Use image node_id 1 for calling the UnsupervisedMixin obj's underlying member method code with example usage: obj.fit(X, y, session, run_kwargs) and returns: self