class_docstr: TODO: Short description of my dataset.
code: def _generate_examples(self, filepath, split):
      # TODO: This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
      # The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
      with open(filepath, encoding="utf-8") as f:
          for key, row in enumerate(f):
              data = json.loads(row)
              if self.config.name == "first_domain":
                  # Yields examples as (key, example) tuples
                  yield key, {
                      "sentence": data["sentence"],
                      "option1": data["option1"],
                      "answer": ""
                      if split == "test"
                      else data["answer"],
                  }
              else:
                  yield key, {
                      "sentence": data["sentence"],
                      "option2": data["option2"],
                      "second_domain_answer": ""
                      if split == "test"
                      else data["second_domain_answer"],
                  }
  
file_path: datasets/templates/new_dataset_script.py
imports: import csv
  import json
  import os
  import datasets
label_desc: Use image node_id 3 for calling the NewDataset obj's underlying member method code with example usage: obj._generate_examples(filepath, split) without return types