class_docstr: MNIST.
docstr: 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
docstr_tok: ["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"]
code: def _generate_examples(self, num_examples, data_path, label_path):
      """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
      """
      images = _extract_mnist_images(data_path, num_examples)
      labels = _extract_mnist_labels(label_path, num_examples)
      data = list(zip(images, labels))
  
      # Using index as key since data is always loaded in same order.
      for index, (image, label) in enumerate(data):
          record = {"image": image, "label": label}
          yield index, record
  
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 3 for calling the MNIST obj's underlying member method code with example usage: obj._generate_examples(num_examples, data_path, label_path) without return types