code: def _generate_examples(self, num_examples, data_path, label_path):
      
      images = _extract_mnist_images(data_path, num_examples)
      labels = _extract_mnist_labels(label_path, num_examples)
      data = list(zip(images, labels))
  
      # Data is shuffled automatically to distribute classes uniformly.
      for image, label in data:
        yield {
            "image": image,
            "label": label,
        }
docs: Generate MNIST examples as dicts.
  
      Args:
        num_examples (int): The number of example.
        data_path (str): Path to the data files
        label_path (str): Path to the labels
  
      Yields:
        Generator yielding the next examples