class_docstr: DatasetBuilder for story_cloze dataset.
class_docstr_tok: ["DatasetBuilder","for","story_cloze","dataset","."]
docstr: Yields examples.
docstr_tok: ["Yields","examples","."]
code: def _generate_examples(self, filepath):
      """Yields examples."""
      with epath.Path(filepath).open() as f:
          reader = csv.DictReader(f)
          for row in reader:
              context = " ".join(
                  [
                      row["InputSentence1"],
                      row["InputSentence2"],
                      row["InputSentence3"],
                      row["InputSentence4"],
                  ]
              )
              endings = [
                  row["RandomFifthSentenceQuiz1"],
                  row["RandomFifthSentenceQuiz2"],
              ]
  
              yield row["InputStoryid"], {
                  "context": context,
                  "endings": endings,
                  "label": row.get("AnswerRightEnding", -1),
              }
  
file_path: datasets/tensorflow_datasets/datasets/story_cloze/story_cloze_dataset_builder.py
imports: from __future__ import annotations
  import csv
  import os
  from etils import epath
  import numpy
  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) without return types