class_docstr: DatasetBuilder for rlu_rwrl dataset.
class_docstr_tok: ["DatasetBuilder","for","rlu_rwrl","dataset","."]
docstr: Yields examples.
docstr_tok: ["Yields","examples","."]
code: def _generate_examples(self, paths):
      """Yields examples."""
      beam = tfds.core.lazy_imports.apache_beam
      file_paths = paths["file_paths"]
  
      # Take one item to get the output types and shapes.
      example_item = None
      for example_item in tf.data.TFRecordDataset(file_paths[:1]).take(
          1
      ):
          break
      if example_item is None:
          raise ValueError("Empty dataset")
  
      feature_description = tf_example_to_feature_description(
          example_item
      )
  
      def _generate_examples_one_file(
          path,
      ) -> Generator[Tuple[str, Dict[str, Any]], None, None]:
          """Yields examples from one file."""
          counter = 0
          key_prefix = os.path.basename(path)
          # Dataset of tf.Examples containing full episodes.
          example_ds = tf.data.TFRecordDataset(filenames=str(path))
          # Dataset of episodes, each represented as a dataset of steps.
          episode_ds = example_ds.map(
              functools.partial(
                  self.tf_example_to_step_ds,
                  feature_description=feature_description,
              ),
              num_parallel_calls=tf.data.experimental.AUTOTUNE,
          )
          episode_ds = tfds.as_numpy(episode_ds)
          for e in episode_ds:
              episode_id = counter
              yield f"{key_prefix}/{episode_id}", e
              counter += 1
  
      return beam.Create(file_paths) | beam.FlatMap(
          _generate_examples_one_file
      )
  
imports: from __future__ import annotations
  import collections
  import dataclasses
  import functools
  import os
  from typing import Any, Dict, Generator, Optional, Sequence, Text, Tuple, Union
  import numpy
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  import tensorflow_datasets.public_api
  from tensorflow_datasets.rl_unplugged import rlu_common
label_desc: Use image node_id 7 for calling the RluRwrl obj's underlying member method code with example usage: obj._generate_examples(paths) and returns: unknown