class_docstr: DatasetBuilder for real_toxicity_prompts dataset.
docstr: Yields examples.
docstr_tok: ["Yields","examples","."]
code: def _generate_examples(self, path):
      """Yields examples."""
  
      def _get_toxic_features(row_toxic_data):
          return {f: row_toxic_data[f] for f in _TOXIC_FEATURES.keys()}
  
      def _get_row_features(row_data):
          row_features = {
              "filename": row_data["filename"],
              "begin": row_data["begin"],
              "end": row_data["end"],
              "challenging": row_data["challenging"],
              "prompt": _get_toxic_features(row_data["prompt"]),
              "continuation": _get_toxic_features(
                  row_data["continuation"]
              ),
          }
          return row_features
  
      with epath.Path(path).open() as f:
          for i, row in enumerate(f):
              row_data = json.loads(row)
              yield i, _get_row_features(row_data)
  
file_path: datasets/tensorflow_datasets/datasets/real_toxicity_prompts/real_toxicity_prompts_dataset_builder.py
imports: import json
  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(path) and returns: unknown, row_features