code: def split2dirs(split):
      """
      This gives directory names for a given data split
  
      Arguments
      ---------
      split : str
          The split of ksponspeech data
  
      Returns
      -------
      list
          A list containing directories of the given data split
  
      """
  
      if split not in ["eval_other", "eval_clean", "train", "dev"]:
          raise ValueError("Unsupported data split")
  
      if "eval" in split:
          dirs = ["test/" + split]
  
      elif split == "dev":
          dirs = [
              "train/KsponSpeech_05/KsponSpeech_{0:>04d}".format(num)
              for num in range(621, 624)
          ]
  
      elif split == "train":
          dirs = (
              [
                  "train/KsponSpeech_01/KsponSpeech_{0:>04d}".format(
                      num
                  )
                  for num in range(1, 125)
              ]
              + [
                  "train/KsponSpeech_02/KsponSpeech_{0:>04d}".format(
                      num
                  )
                  for num in range(125, 249)
              ]
              + [
                  "train/KsponSpeech_03/KsponSpeech_{0:>04d}".format(
                      num
                  )
                  for num in range(249, 373)
              ]
              + [
                  "train/KsponSpeech_04/KsponSpeech_{0:>04d}".format(
                      num
                  )
                  for num in range(373, 497)
              ]
              + [
                  "train/KsponSpeech_05/KsponSpeech_{0:>04d}".format(
                      num
                  )
                  for num in range(497, 621)
              ]
          )
  
      return dirs
  
file_path: speechbrain/recipes/KsponSpeech/ASR/transformer/ksponspeech_prepare.py
imports: import csv
  import logging
  import os
  import re
  import torchaudio
  from speechbrain.dataio.dataio import load_pkl, merge_csvs, save_pkl
  from speechbrain.utils.data_utils import get_all_files
label_desc: Use image node_id 6 for calling a global function with example usage: split2dirs(split) and returns: dirs