code: def MNISTIODataset(images=None, labels=None, internal=True):
      """MNISTIODataset"""
      assert internal, (
          "MNISTIODataset constructor is private; please use one "
          "of the factory methods instead (e.g., "
          "IODataset.from_mnist())"
      )
  
      assert (
          images is not None or labels is not None
      ), "images and labels could not be all None"
  
      images_dataset = (
          MNISTImageIODataset(images) if images is not None else None
      )
  
      labels_dataset = (
          MNISTLabelIODataset(labels) if labels is not None else None
      )
  
      if images is None:
          return labels_dataset
      if labels is None:
          return images_dataset
  
      return tf.data.Dataset.zip((images_dataset, labels_dataset))
  
file_path: io/tensorflow_io/python/ops/mnist_dataset_ops.py
imports: import tensorflow
  from tensorflow_io.python.ops import core_ops
label_desc: Use image node_id 1 for calling a global function with example usage: MNISTIODataset(images, labels, internal) and returns: tf, labels_dataset, images_dataset