code: def _get_utt_split_lists(
      data_folders,
      split_ratio,
      verification_pairs_file,
      split_speaker=False,
  ):
      """
      Tot. number of speakers vox1= 1211.
      Tot. number of speakers vox2= 5994.
      Splits the audio file list into train and dev.
      This function automatically removes verification test files from the training and dev set (if any).
      """
      train_lst = []
      dev_lst = []
  
      print("Getting file list...")
      for data_folder in data_folders:
          test_lst = [
              line.rstrip("\n").split(" ")[1]
              for line in open(verification_pairs_file)
          ]
          test_lst = set(sorted(test_lst))
  
          test_spks = [snt.split("/")[0] for snt in test_lst]
  
          path = os.path.join(data_folder, "wav", "**", "*.wav")
          if split_speaker:
              # avoid test speakers for train and dev splits
              audio_files_dict = {}
              for f in glob.glob(path, recursive=True):
                  spk_id = f.split("/wav/")[1].split("/")[0]
                  if spk_id not in test_spks:
                      audio_files_dict.setdefault(spk_id, []).append(f)
  
              spk_id_list = list(audio_files_dict.keys())
              random.shuffle(spk_id_list)
              split = int(0.01 * split_ratio[0] * len(spk_id_list))
              for spk_id in spk_id_list[:split]:
                  train_lst.extend(audio_files_dict[spk_id])
  
              for spk_id in spk_id_list[split:]:
                  dev_lst.extend(audio_files_dict[spk_id])
          else:
              # avoid test speakers for train and dev splits
              audio_files_list = []
              for f in glob.glob(path, recursive=True):
                  try:
                      spk_id = f.split("/wav/")[1].split("/")[0]
                  except ValueError:
                      logger.info(f"Malformed path: {f}")
                      continue
                  if spk_id not in test_spks:
                      audio_files_list.append(f)
  
              random.shuffle(audio_files_list)
              split = int(0.01 * split_ratio[0] * len(audio_files_list))
              train_snts = audio_files_list[:split]
              dev_snts = audio_files_list[split:]
  
              train_lst.extend(train_snts)
              dev_lst.extend(dev_snts)
  
      return train_lst, dev_lst
  
file_path: speechbrain/recipes/VoxCeleb/SpeakerRec/voxceleb_prepare.py
imports: import os
  import csv
  import logging
  import glob
  import random
  import shutil
  import sys
  import numpy
  import torch
  import torchaudio
  from tqdm.contrib import tqdm
  from speechbrain.dataio.dataio import load_pkl, save_pkl
label_desc: Use image node_id 4 for calling a global function with example usage: _get_utt_split_lists(data_folders, split_ratio, verification_pairs_file, split_speaker) and returns: train_lst,  dev_lst