code: def split_sets(wav_list, split_ratio):
      """Randomly splits the wav list into training, validation, and test lists.
  
      Arguments
      ---------
      wav_list : list
          list of all the signals in the dataset
      split_ratio: list
          List composed of three integers that sets split ratios for train, valid,
          and test sets, respectively. For instance split_ratio=[80, 10, 10] will
          assign 80% of the sentences to training, 10% for validation, and 10%
          for test.
      Returns
      ------
      dictionary containing train, valid, and test splits.
      """
      # Random shuffles the list
      random.shuffle(wav_list)
      tot_split = sum(split_ratio)
      tot_snts = len(wav_list)
      data_split = {}
      splits = ["train", "valid"]
  
      for i, split in enumerate(splits):
          n_snts = int(tot_snts * split_ratio[i] / tot_split)
          data_split[split] = wav_list[0:n_snts]
          del wav_list[0:n_snts]
      data_split["test"] = wav_list
  
      return data_split
  
file_path: speechbrain/recipes/LibriTTS/libritts_prepare.py
imports: from speechbrain.utils.data_utils import get_all_files, download_file
  import json
  import os
  import shutil
  import random
  import logging
  import torchaudio
  import torch
  from tqdm import tqdm
  from speechbrain.inference.txt import GraphemeToPhoneme
  from speechbrain.utils.text_to_sequence import _g2p_keep_punctuations
label_desc: Use image node_id 5 for calling a global function with example usage: split_sets(wav_list, split_ratio) and returns: data_split