class_docstr: An index-based algorithm. It uses a non-parametric method for classification or regression.
  
  For classification problems, the algorithm queries the k points that are closest to the sample
  point and returns the most frequently used label of their class as the predicted label. For
  regression problems, the algorithm queries the k closest points to the sample point and returns
  the average of their feature values as the predicted value.
class_docstr_tok: ["An","index-based","algorithm",".","It","uses","a","non-parametric","method","for","classification","or","regression",".","For","classification","problems",",","the","algorithm","queries","the","k","points","that","are","closest","to","the","sample","point","and","returns","the","most","frequently","used","label","of","their","class","as","the","predicted","label",".","For","regression","problems",",","the","algorithm","queries","the","k","closest","points","to","the","sample","point","and","returns","the","average","of","their","feature","values","as","the","predicted","value","."]
docstr: Placeholder docstring
docstr_tok: ["Placeholder","docstring"]
code: def _prepare_for_training(
      self, records, mini_batch_size=None, job_name=None
  ):
      """Placeholder docstring"""
      super(KNN, self)._prepare_for_training(
          records, mini_batch_size=mini_batch_size, job_name=job_name
      )
  
imports: from __future__ import absolute_import
  from typing import Union, Optional
  from sagemaker import image_uris
  from sagemaker.amazon.amazon_estimator import AmazonAlgorithmEstimatorBase
  from sagemaker.amazon.common import RecordSerializer, RecordDeserializer
  from sagemaker.amazon.hyperparameter import Hyperparameter
  from sagemaker.amazon.validation import ge, isin
  from sagemaker.predictor import Predictor
  from sagemaker.model import Model
  from sagemaker.session import Session
  from sagemaker.utils import pop_out_unused_kwarg
  from sagemaker.vpc_utils import VPC_CONFIG_DEFAULT
  from sagemaker.workflow.entities import PipelineVariable
label_desc: Use image node_id 3 for calling the KNN obj's underlying member method code with example usage: obj._prepare_for_training(records, mini_batch_size, job_name) without return types