code: def get_paddedXY(
      X,
      y,
      vocab_size=20000,
      sentence_length=100,
      oov=2,
      start=1,
      index_from=3,
      seed=113,
      shuffle=True,
  ):
      if shuffle:
          np.random.seed(seed)
          np.random.shuffle(X)
          np.random.seed(seed)
          np.random.shuffle(y)
  
      if start is not None:
          X = [[start] + [w + index_from for w in x] for x in X]
      else:
          X = [[w + index_from for w in x] for x in X]
  
      if not vocab_size:
          vocab_size = max([max(x) for x in X])
  
      # word ids - pad (0), start (1), oov (2)
      if oov is not None:
          X = [[oov if w >= vocab_size else w for w in x] for x in X]
      else:
          X = [[w for w in x if w < vocab_size] for x in X]
  
      X = pad_sentences(X, sentence_length=sentence_length)
      y = np.array(y, dtype=np.int32).reshape((len(y), 1))
  
      return X, y
  
file_path: neon/neon/data/text_preprocessing.py
imports: from future import standard_library
  from builtins import map
  import numpy
  import re
  from neon.util.compat import pickle
label_desc: Use image node_id 4 for calling a global function with example usage: get_paddedXY(X, y, vocab_size, sentence_length, oov, start, index_from, seed, shuffle) and returns: X,  y