class_docstr: DatasetBuilder for mt_opt datasets.
class_docstr_tok: ["DatasetBuilder","for","mt_opt","datasets","."]
docstr: Yields examples from one file.
docstr_tok: ["Yields","examples","from","one","file","."]
code: def _generate_examples_one_file(
      self, path
  ) -> Generator[Tuple[str, Dict[str, Any]], None, None]:
      """Yields examples from one file."""
      # Dataset of tf.Examples containing full episodes.
      example_ds = tf.data.TFRecordDataset(filenames=str(path))
  
      example_features = _name_to_features_encode(
          self.builder_config.name
      )
      example_specs = example_features.get_serialized_info()
      parser = tfds.core.example_parser.ExampleParser(example_specs)
  
      parsed_examples = example_ds.map(parser.parse_example)
      decoded_examples = parsed_examples.map(
          example_features.decode_example
      )
  
      for index, example in enumerate(tfds.as_numpy(decoded_examples)):
          if self.builder_config.name == "rlds":
              id_key = "episode_id"
          else:
              id_key = "task_code"
          example_id = (
              str(index) + str(example[id_key]) + str(hash(path))
          )
          yield example_id, example
  
file_path: datasets/tensorflow_datasets/robotics/mt_opt/mt_opt.py
imports: from __future__ import annotations
  import os
  from typing import Any, Dict, Generator, 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 MtOpt obj's underlying member method code with example usage: obj._generate_examples_one_file(path) without return types