class_docstr: The DementiaBank dataset for voice classification of Dementia.
docstr: Returns SplitGenerators.
docstr_tok: ["Returns","SplitGenerators","."]
code: def _split_generators(self, dl_manager):
      """Returns SplitGenerators."""
  
      control_folder = os.path.join(
          dl_manager.manual_dir, _CONTROL_FOLDER
      )
      dementia_folder = os.path.join(
          dl_manager.manual_dir, _DEMENTIA_FOLDER
      )
      examples_and_speaker_ids = []
      for fname in tf.io.gfile.glob("{}/*.mp3".format(control_folder)):
          _, short_name = os.path.split(fname)
          speaker_id, _ = short_name.split("-")
          example = {
              "audio": fname,
              "label": "control",
              "speaker_id": speaker_id,
          }
          examples_and_speaker_ids.append((example, speaker_id))
      for fname in tf.io.gfile.glob("{}/*.mp3".format(dementia_folder)):
          _, short_name = os.path.split(fname)
          speaker_id, _ = short_name.split("-")
          example = {
              "audio": fname,
              "label": "dementia",
              "speaker_id": speaker_id,
          }
          examples_and_speaker_ids.append((example, speaker_id))
      split_probs = [("train", 0.7), ("validation", 0.1), ("test", 0.2)]
      splits = _get_inter_splits_by_group(
          examples_and_speaker_ids, split_probs, 0
      )
  
      return [
          tfds.core.SplitGenerator(
              name=tfds.Split.TRAIN,
              gen_kwargs={"examples": splits["train"]},
          ),
          tfds.core.SplitGenerator(
              name=tfds.Split.VALIDATION,
              gen_kwargs={"examples": splits["validation"]},
          ),
          tfds.core.SplitGenerator(
              name=tfds.Split.TEST,
              gen_kwargs={"examples": splits["test"]},
          ),
      ]
  
file_path: datasets/tensorflow_datasets/audio/dementiabank.py
imports: from __future__ import annotations
  import collections
  import os
  import textwrap
  import numpy
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  import tensorflow_datasets.public_api
label_desc: Use image node_id 2 for calling the Dementiabank obj's underlying member method code with example usage: obj._split_generators(dl_manager) and returns: list