class_docstr: Dmlab dataset.
code: def _generate_examples(self, images_dir_path, split_name):
      path_glob = os.path.join(
          images_dir_path, "dmlab-{}.tfrecord*".format(split_name)
      )
      files = tf.io.gfile.glob(path_glob)
  
      logging.info("Reading data from %s.", ",".join(files))
      with tf.Graph().as_default():
          ds = tf.data.TFRecordDataset(files)
          ds = ds.map(
              self._parse_single_image,
              num_parallel_calls=tf.data.experimental.AUTOTUNE,
          )
          iterator = tf.compat.v1.data.make_one_shot_iterator(
              ds
          ).get_next()
          with tf.compat.v1.Session() as sess:
              sess.run(tf.compat.v1.global_variables_initializer())
              try:
                  while True:
                      result = sess.run(iterator)
                      yield result["filename"], {
                          "image": io.BytesIO(result["image"]),
                          "filename": result["filename"],
                          "label": result["label"],
                      }
  
              except tf.errors.OutOfRangeError:
                  return
  
file_path: datasets/tensorflow_datasets/image_classification/dmlab.py
imports: from __future__ import annotations
  import io
  import os
  from absl import logging
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  import tensorflow_datasets.public_api
label_desc: Use image node_id 4 for calling the Dmlab obj's underlying member method code with example usage: obj._generate_examples(images_dir_path, split_name) without return types