docstr: Train an elephas model on an RDD of LabeledPoints
          
docstr_tok: ["Train","an","elephas","model","on","an","RDD","of","LabeledPoints"]
code: def fit(
      self,
      labeled_points,
      epochs=10,
      batch_size=32,
      verbose=0,
      validation_split=0.1,
      categorical=False,
      nb_classes=None,
  ):
      """Train an elephas model on an RDD of LabeledPoints"""
      rdd = lp_to_simple_rdd(labeled_points, categorical, nb_classes)
      rdd = rdd.repartition(self.num_workers)
      self._fit(
          rdd=rdd,
          epochs=epochs,
          batch_size=batch_size,
          verbose=verbose,
          validation_split=validation_split,
      )
  
imports: import json
  from functools import partial
  from itertools import tee
  from typing import Union
  import h5py
  import numpy
  import pyspark
  from pyspark import RDD
  from tensorflow.keras.models import load_model
  from tensorflow.keras.models import model_from_json
  from tensorflow.keras.optimizers import get
  from tensorflow.keras.optimizers import serialize, deserialize
  from .mllib import to_matrix, from_matrix, to_vector, from_vector
  from .parameter.factory import ClientServerFactory
  from .utils import lp_to_simple_rdd, to_simple_rdd
  from .utils import model_to_dict
  from .utils import subtract_params, divide_by
  from .worker import AsynchronousSparkWorker, SparkWorker
label_desc: Use image node_id 2 for calling the SparkMLlibModel obj's underlying member method code with example usage: obj.fit(labeled_points, epochs, batch_size, verbose, validation_split, categorical, nb_classes) without return types