code: def _extract_mnist_images(image_filepath, num_images):
      with tf.io.gfile.GFile(image_filepath, "rb") as f:
          f.read(16)  # header
          buf = f.read(
              _MNIST_IMAGE_SIZE * _MNIST_IMAGE_SIZE * num_images
          )
          data = np.frombuffer(
              buf,
              dtype=np.uint8,
          ).reshape(num_images, _MNIST_IMAGE_SIZE, _MNIST_IMAGE_SIZE, 1)
          return data
  
imports: import os
  import numpy
  from six.moves import urllib
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  import tensorflow_datasets.public_api
label_desc: Use image node_id 1 for calling a global function with example usage: _extract_mnist_images(image_filepath, num_images) and returns: data