code: def decode(serialized_example):
      """Parses an image and label from the given `serialized_example`."""
      features = tf.parse_single_example(
          serialized_example,
          # Defaults are not specified since both keys are required.
          features={
              "image_raw": tf.FixedLenFeature([], tf.string),
              "label": tf.FixedLenFeature([], tf.int64),
          },
      )
  
      # Convert from a scalar string tensor (whose single string has
      # length mnist.IMAGE_PIXELS) to a uint8 tensor with shape
      # [mnist.IMAGE_PIXELS].
      image = tf.decode_raw(features["image_raw"], tf.uint8)
      image.set_shape((mnist.IMAGE_PIXELS))
      image = tf.reshape(image, [28, 28, 1])
  
      # Convert label from a scalar uint8 tensor to an int32 scalar.
      label = tf.cast(features["label"], tf.int32)
  
      return image, label
  
file_path: attributionpriors/attributionpriors/mnist/mnist_reader.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import argparse
  import os.path
  import sys
  import time
  import math
  import tensorflow
  from tensorflow.examples.tutorials.mnist import mnist
label_desc: Use image node_id 1 for calling a global function with example usage: decode(serialized_example) and returns: image,  label