class_docstr: DatasetBuilder for smartwatch_gestures dataset.
docstr: Yields examples.
docstr_tok: ["Yields","examples","."]
code: def _generate_examples(self, path):
      """Yields examples."""
  
      pd = tfds.core.lazy_imports.pandas
  
      for f in path.glob("*/*/*.txt"):
          table = pd.read_table(
              f,
              sep=" ",
              header=None,
              names=[
                  "time_millis",
                  "time_nanos",
                  "time_event",
                  "accel_x",
                  "accel_y",
                  "accel_z",
              ],
          )
  
          # Create a unique key for each recorded gesture.
          participant_numstr = f.parent.parent.name[1:]  # Drop the "U".
          gesture_numstr = f.parent.name
          attempt_numstr = f.stem
          k = int(
              "".join(
                  [participant_numstr, gesture_numstr, attempt_numstr]
              )
          )
  
          yield k, {
              "features": {
                  "time_millis": table["time_millis"].to_numpy(),
                  "time_nanos": table["time_nanos"].to_numpy(),
                  "time_event": table["time_event"].to_numpy(),
                  "accel_x": table["accel_x"].to_numpy(),
                  "accel_y": table["accel_y"].to_numpy(),
                  "accel_z": table["accel_z"].to_numpy(),
              },
              "participant": int(participant_numstr),
              "attempt": int(attempt_numstr),
              "gesture": int(gesture_numstr) - 1,
          }
  
file_path: datasets/tensorflow_datasets/datasets/smartwatch_gestures/smartwatch_gestures_dataset_builder.py
imports: from __future__ import annotations
  import numpy
  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) without return types