class_docstr: A supervised learning algorithms used for solving classification or regression problems.
  
  For input, you give the model labeled examples (x, y). x is a high-dimensional vector and
  y is a numeric label. For binary classification problems, the label must be either 0 or 1.
  For multiclass classification problems, the labels must be from 0 to num_classes - 1. For
  regression problems, y is a real number. The algorithm learns a linear function, or, for
  classification problems, a linear threshold function, and maps a vector x to an approximation
  of the label y.
docstr: Placeholder docstring
docstr_tok: ["Placeholder","docstring"]
code: def _prepare_for_training(
      self, records, mini_batch_size=None, job_name=None
  ):
      """Placeholder docstring"""
      num_records = None
      if isinstance(records, list):
          for record in records:
              if record.channel == "train":
                  num_records = record.num_records
                  break
          if num_records is None:
              raise ValueError("Must provide train channel.")
      else:
          num_records = records.num_records
  
      # mini_batch_size can't be greater than number of records or training job fails
      mini_batch_size = (
          mini_batch_size
          or self._get_default_mini_batch_size(num_records)
      )
  
      super(LinearLearner, self)._prepare_for_training(
          records, mini_batch_size=mini_batch_size, job_name=job_name
      )
  
imports: from __future__ import absolute_import
  import logging
  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 isin, gt, lt, ge, le
  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 LinearLearner obj's underlying member method code with example usage: obj._prepare_for_training(records, mini_batch_size, job_name) without return types