class_docstr: This is a dataset for classifying news articles into 4 classes.
docstr: Yeilds Examples.
  
  Args:
    path: The path of the file to be read for this split
  
  Yields:
    Generator yielding the next examples
docstr_tok: ["Yeilds","Examples",".","Args",":","path",":","The","path","of","the","file","to","be","read","for","this","split","Yields",":","Generator","yielding","the","next","examples"]
code: def _generate_examples(self, path):
      """Yeilds Examples.
  
      Args:
        path: The path of the file to be read for this split
  
      Yields:
        Generator yielding the next examples
      """
      with epath.Path(path).open() as f:
          reader = csv.reader(f)
          # CSV files : class label (as number), title, description
          for index, row in enumerate(reader):
              key = index
              # The values in the csv file do not have quotes
              example = {
                  # The class labels start from 1 in this dataset
                  "label": int(row[0]) - 1,
                  "title": row[1],
                  "description": row[2],
              }
              yield key, example
  
file_path: datasets/tensorflow_datasets/datasets/ag_news_subset/ag_news_subset_dataset_builder.py
imports: import csv
  import os
  from etils import epath
  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) without return types