code: def __create_optimizer(
      self,
      x=None,
      y=None,
      batch_size=32,
      nb_epoch=10,
      validation_data=None,
      is_distributed=False,
  ):
      if is_distributed:
          if isinstance(x, np.ndarray):
              input = to_sample_rdd(x, y)
              validation_data_rdd = to_sample_rdd(*validation_data)
          elif isinstance(x, RDD):
              input = x
              validation_data_rdd = validation_data
          return self.__create_distributed_optimizer(
              training_rdd=input,
              batch_size=batch_size,
              nb_epoch=nb_epoch,
              validation_data=validation_data_rdd,
          )
      else:
          if isinstance(x, np.ndarray):
              return self.__create_local_optimizer(
                  x,
                  y,
                  batch_size=batch_size,
                  nb_epoch=nb_epoch,
                  validation_data=validation_data,
              )
      invalidInputError(False, "not supported type: %s" % x)
  
file_path: BigDL/python/dllib/src/bigdl/dllib/nn/keras/backend.py
imports: from bigdl.dllib.nn.keras.optimization import *
  from bigdl.dllib.utils.common import *
label_desc: Use image node_id 5 for calling the KerasModelWrapper obj's underlying member method code with example usage: obj.__create_optimizer(x, y, batch_size, nb_epoch, validation_data, is_distributed) and returns: self, self