class_docstr: Produces a sequence of MNIST digits with labels.
docstr: Preprocesses image and labels data.
  
  Args:
    images: Numpy `array` representing the image data.
    labels: Numpy `array` representing the labels data (range 0-9).
  
  Returns:
    images: Numpy `array` representing the image data, normalized
            and expanded for convolutional network input.
    labels: Numpy `array` representing the labels data (range 0-9),
            as one-hot (categorical) values.
docstr_tok: ["Preprocesses","image","and","labels","data",".","Args",":","images",":","Numpy","`","array","`","representing","the","image","data",".","labels",":","Numpy","`","array","`","representing","the","labels","data","(","range","0-9",")",".","Returns",":","images",":","Numpy","`","array","`","representing","the","image","data",",","normalized","and","expanded","for","convolutional","network","input",".","labels",":","Numpy","`","array","`","representing","the","labels","data","(","range","0-9",")",",","as","one-hot","(","categorical",")","values","."]
code: def __preprocessing(images, labels):
      """Preprocesses image and labels data.
  
      Args:
        images: Numpy `array` representing the image data.
        labels: Numpy `array` representing the labels data (range 0-9).
  
      Returns:
        images: Numpy `array` representing the image data, normalized
                and expanded for convolutional network input.
        labels: Numpy `array` representing the labels data (range 0-9),
                as one-hot (categorical) values.
      """
      images = 2 * (images / 255.0) - 1.0
      images = images[..., tf.newaxis]
  
      labels = tf_keras.utils.to_categorical(labels)
      return images, labels
  
imports: import os
  import warnings
  from absl import app
  from absl import flags
  import matplotlib
  from matplotlib import figure
  from matplotlib.backends import backend_agg
  import numpy
  import tensorflow.compat.v2
  import tensorflow_probability
  from tensorflow_probability.python.internal import tf_keras
label_desc: Use image node_id 3 for calling the MNISTSequence obj's underlying member method code with example usage: obj.__preprocessing(images, labels) and returns: images,  labels