class_docstr: OpinionAbstracts Dataset Builder.
class_docstr_tok: ["OpinionAbstracts","Dataset","Builder","."]
docstr: Yields examples.
docstr_tok: ["Yields","examples","."]
code: def _generate_examples(
      self, path: Optional[Text] = None
  ) -> Iterator[Tuple[Text, Dict[Text, Any]]]:
      """Yields examples."""
      with tf.io.gfile.GFile(path, "rb") as f:
          for example in json.load(f):
              config = self.builder_config
              opinions = example[config.opinions_key].items()
              opinions = [{"key": k, "value": v} for k, v in opinions]
              features = {config.opinions_key: opinions}
              for k in [
                  config.name_key,
                  config.id_key,
                  config.summary_key,
              ]:
                  features[k] = example[k]
              yield example[config.id_key], features
  
file_path: datasets/tensorflow_datasets/datasets/opinion_abstracts/opinion_abstracts_dataset_builder.py
imports: from __future__ import annotations
  import json
  import os
  from typing import Any, Dict, Iterator, List, Optional, Text, Tuple
  import numpy
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  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