code: def load_imdb():
      """
      Load IMDB dataset
      Transform input data into an RDD of Sample
      """
      from keras.preprocessing import sequence
      from keras.datasets import imdb
  
      (X_train, y_train), (X_test, y_test) = imdb.load_data(
          nb_words=20000
      )
      X_train = sequence.pad_sequences(X_train, maxlen=100)
      X_test = sequence.pad_sequences(X_test, maxlen=100)
      return X_train, y_train, X_test, y_test
  
imports: from optparse import OptionParser
  import sys
label_desc: Use image node_id 1 for calling a global function with example usage: load_imdb() and returns: X_train,  y_train,  X_test,  y_test