class_docstr: This dataset contains the PG-19 language modeling benchmark.
docstr: Yields examples.
docstr_tok: ["Yields","examples","."]
code: def _generate_examples(self, filepath, metadata):
      """Yields examples."""
      for file in tf.io.gfile.listdir(filepath):
          book_id = int(file.rstrip(".txt"))
          book_data = metadata[book_id]
          path = os.path.join(filepath, file)
          with tf.io.gfile.GFile(path, "r") as f:
              text = f.read().strip()
              yield book_id, {
                  "book_text": text,
                  "book_id": book_id,
                  "book_title": book_data[0],
                  "publication_date": book_data[1],
                  "book_link": book_data[2],
              }
  
file_path: datasets/tensorflow_datasets/datasets/pg19/pg19_dataset_builder.py
imports: from __future__ import annotations
  import os
  import numpy
  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 Builder obj's underlying member method code with example usage: obj._generate_examples(filepath, metadata) without return types