class_docstr: DatasetBuilder for robomimic datasets.
docstr: Yields examples.
docstr_tok: ["Yields","examples","."]
code: def _generate_examples(self, path):
      """Yields examples."""
      path = epath.Path(path["file_path"])
      with path.open("rb") as f:
          with h5py.File(f, "r") as dataset_file:
              data = dataset_file["data"]
              if "mask" in dataset_file.keys():
                  mask = dataset_file["mask"]
                  string_mask = {}
                  for k in mask:
                      string_mask[k] = []
                      for element in mask[k]:
                          string_mask[k].append(element.decode("UTF-8"))
                  mask = string_mask
                  for key in data:
                      yield key, {
                          "steps": build_episode(data[key]),
                          "horizon": self.builder_config.horizon,
                          "episode_id": key,
                          **episode_metadata(mask, key),
                      }
              else:
                  for key in data:
                      yield key, {
                          "steps": build_episode(data[key]),
                          "horizon": self.builder_config.horizon,
                          "episode_id": key,
                      }
  
imports: import dataclasses
  import enum
  from typing import Any, Dict, List, Mapping
  from etils import epath
  import h5py
  import numpy
  import tensorflow_datasets.public_api
  import tree
label_desc: Use image node_id 5 for calling the RobomimicBuilder obj's underlying member method code with example usage: obj._generate_examples(path) without return types