code: def dataset(directory, images_file, labels_file):
      """Download and parse MNIST dataset."""
  
      images_file = download(directory, images_file)
      labels_file = download(directory, labels_file)
  
      check_image_file_header(images_file)
      check_labels_file_header(labels_file)
  
      def decode_image(image):
          # Normalize from [0, 255] to [0.0, 1.0]
          image = tf.io.decode_raw(image, tf.uint8)
          image = tf.cast(image, tf.float32)
          image = tf.reshape(image, [784])
          return image / 255.0
  
      def decode_label(label):
          label = tf.io.decode_raw(
              label, tf.uint8
          )  # tf.string -> [tf.uint8]
          label = tf.reshape(label, [])  # label is a scalar
          return tf.cast(label, tf.int32)
  
      images = tf.data.FixedLengthRecordDataset(
          images_file, 28 * 28, header_bytes=16
      ).map(decode_image)
      labels = tf.data.FixedLengthRecordDataset(
          labels_file, 1, header_bytes=8
      ).map(decode_label)
      return tf.data.Dataset.zip((images, labels))
  
file_path: tensorflow-upstream/tensorflow/lite/tutorials/dataset.py
imports: import gzip
  import os
  import shutil
  import tempfile
  import urllib
  import numpy
  import tensorflow
label_desc: Use image node_id 5 for calling a global function with example usage: dataset(directory, images_file, labels_file) and returns: tf, unknown, tf