class_docstr: DatasetBuilder for penguins dataset.
class_docstr_tok: ["DatasetBuilder","for","penguins","dataset","."]
docstr: Yields examples.
docstr_tok: ["Yields","examples","."]
code: def _generate_examples(self, path):
      """Yields examples."""
      with path.open() as f:  # pytype: disable=attribute-error  # gen-stub-imports
          for i, row in enumerate(csv.DictReader(f)):
              row = {f: self._clean_up(f, v) for f, v in row.items()}
  
              # Pack features if requested.
              if self.builder_config.name == "processed":
                  label_name = self.builder_config.label
                  label = row.pop(label_name, None)
                  row = list(row.values())
                  yield i, {"features": row, label_name: label}
              else:
                  yield i, row
  
file_path: datasets/tensorflow_datasets/datasets/penguins/penguins_dataset_builder.py
imports: from __future__ import annotations
  import csv
  import dataclasses
  import textwrap
  import typing
  from typing import Any, Mapping, Optional, Union
  import numpy
  import tensorflow_datasets.core.utils
  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