code: def fit(
      self,
      X,
      y,
      sample_weight=None,
      X_validation=None,
      y_validation=None,
      sample_weight_validation=None,
      log_to_file=None,
      max_time=None,
  ):
      rows_limit = self.params.get("rows_limit", KNN_ROWS_LIMIT)
      if X.shape[0] > rows_limit:
          X1, _, y1, _ = train_test_split(
              X, y, train_size=rows_limit, stratify=y, random_state=1234
          )
          self.model.fit(X1, y1)
      else:
          self.model.fit(X, y)
  
imports: import logging
  import os
  import numpy
  import sklearn
  from sklearn.base import ClassifierMixin, RegressorMixin
  from sklearn.model_selection import train_test_split
  from sklearn.neighbors import KNeighborsClassifier, KNeighborsRegressor
  from supervised.algorithms.algorithm import BaseAlgorithm
  from supervised.algorithms.registry import BINARY_CLASSIFICATION, MULTICLASS_CLASSIFICATION, REGRESSION, AlgorithmsRegistry
  from supervised.algorithms.sklearn import SklearnAlgorithm
  from supervised.utils.config import LOG_LEVEL
label_desc: Use image node_id 3 for calling the KNNFit obj's underlying member method code with example usage: obj.fit(X, y, sample_weight, X_validation, y_validation, sample_weight_validation, log_to_file, max_time) without return types