class_docstr: ```
  Abstract class used to tune and train Keras models. The fit method is
  an abstract method and must be implemented by subclasses.
  ```
class_docstr_tok: ["``","`","Abstract","class","used","to","tune","and","train","Keras","models",".","The","fit","method","is","an","abstract","method","and","must","be","implemented","by","subclasses",".","``","`"]
docstr: ```
  Subclasses can override this method if data
  needs to be specially-prepared prior to invoking fit methods
  Args:
    data:  dataset
    train(bool):  If True, prepare for training. Otherwise, prepare for evaluation.
  ```
docstr_tok: ["``","`","Subclasses","can","override","this","method","if","data","needs","to","be","specially-prepared","prior","to","invoking","fit","methods","Args",":","data",":","dataset","train","(","bool",")",":","If","True",",","prepare","for","training",".","Otherwise",",","prepare","for","evaluation",".","``","`"]
code: def _prepare(self, data, train=True):
      """
      ```
      Subclasses can override this method if data
      needs to be specially-prepared prior to invoking fit methods
      Args:
        data:  dataset
        train(bool):  If True, prepare for training. Otherwise, prepare for evaluation.
      ```
      """
      if data is None:
          return None
  
      if hasattr(data, "to_tfdataset"):
          return data.to_tfdataset(train=train)
      else:
          return data
  
imports: from .None import utils
  from .graph.predictor import LinkPredictor, NodePredictor
  from .graph.preprocessor import LinkPreprocessor, NodePreprocessor
  from .imports import *
  from .lroptimize.lrfinder import *
  from .tabular.predictor import TabularPredictor
  from .tabular.preprocessor import TabularPreprocessor
  from .text.ner.predictor import NERPredictor
  from .text.ner.preprocessor import NERPreprocessor
  from .text.predictor import TextPredictor
  from .text.preprocessor import BERTPreprocessor, TextPreprocessor, TransformersPreprocessor
  from .vision.predictor import ImagePredictor
  from .vision.preprocessor import ImagePreprocessor
label_desc: Use image node_id 30 for calling the Learner obj's underlying member method code with example usage: obj._prepare(data, train) and returns: None, data, data