class_docstr: DatasetBuilder for rlu_rwrl dataset.
class_docstr_tok: ["DatasetBuilder","for","rlu_rwrl","dataset","."]
code: def get_features_dict(self):
      # Loads the features dynamically.
      file_paths = rlu_common.get_files(
          prefix=self.get_file_prefix(), num_shards=self.num_shards()
      )
  
      # Take one item to get the output types and shapes.
      example_item = None
      iterator = tfds.as_numpy(tf.data.TFRecordDataset(file_paths[:1]))
      for example_item in iterator:
          break
      if example_item is None:
          raise ValueError("Empty dataset")
  
      feature_description = tf_example_to_feature_description(
          example_item
      )
      feature_description = tree_deflatten_with_delimiter(
          feature_description
      )
      return tfds.features.FeaturesDict(
          {
              "steps": tfds.features.Dataset(
                  {
                      "observation": tf_feature_to_tfds_feature(
                          feature_description["observation"]
                      ),
                      "action": tf_feature_to_tfds_feature(
                          feature_description["action"]
                      ),
                      "reward": tf_feature_to_tfds_feature(
                          feature_description["reward"]
                      ),
                      "is_terminal": np.bool_,
                      "is_first": np.bool_,
                      "is_last": np.bool_,
                      "discount": tf_feature_to_tfds_feature(
                          feature_description["discount"]
                      ),
                  }
              ),
              "episode_return": np.float32,
          }
      )
  
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 1 for calling the RluRwrl obj's underlying member method code with example usage: obj.get_features_dict() and returns: tfds