class_docstr: Reddit TIFU Dataset.
docstr: Yields examples.
code: def _generate_examples(self, path=None, split_path=None, split=None):
      """Yields examples."""
      if split_path:
          split_data = json.load(tf.io.gfile.GFile(split_path))
      with tf.io.gfile.GFile(path, "rb") as f:
          for i, line in enumerate(f):
              # keys are 'title_tokenized','permalink','title','url','num_comments',
              #   'tldr'(optional),'created_utc','trimmed_title_tokenized','ups',
              #   'selftext_html','score','upvote_ratio','tldr_tokenized'(optional),
              #   'selftext','trimmed_title','selftext_without_tldr_tokenized',
              #   'id','selftext_without_tldr'
              d = json.loads(line)
              if not split or (split and d["id"] in split_data[split]):
                  r = {
                      _DOCUMENT: d["selftext_without_tldr"].strip(),
                      _TITLE: d["trimmed_title"].strip(),
                      _TLDR: (d["tldr"] or "").strip(),
                      _ID: d["id"].strip(),
                  }
                  r.update({k: d[k] for k in _ADDITIONAL_FEATURES})
                  # skip if document or summary is empty
                  if (
                      r[_DOCUMENT]
                      and r[self.builder_config.summary_key]
                  ):
                      yield i, r
  
file_path: datasets/tensorflow_datasets/datasets/reddit_tifu/reddit_tifu_dataset_builder.py
imports: import json
  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, split_path, split) without return types