code: def get_spk_list(
      utt2spk_path, min_spk_utt=10, train_frac=0.8, val_frac=0.1
  ):
      # collect spk_id and count
      with open(utt2spk_path, "r", encoding="utf-8") as utt2spk:
          spk_dict = {}
          for line in utt2spk.readlines():
              spk_id = line.strip().split()[1]
              if spk_id in spk_dict:
                  spk_dict[spk_id] += 1
              else:
                  spk_dict[spk_id] = 1
  
      # create spk_list
      spk_list = []
      for spk_id, count in spk_dict.items():
          if count > min_spk_utt:
              spk_list.append(spk_id)
  
      # split spk_list
      spk_list = sorted(spk_list)
      num_speaker = len(spk_list)
      num_train = int(train_frac * num_speaker)
      num_val = int(val_frac * num_speaker)
      random.seed(42)
      random.shuffle(spk_list)
  
      train_spk_list = spk_list[:num_train]
      dev_spk_list = spk_list[num_train : num_train + num_val]
      test_spk_list = spk_list[num_train + num_val :]
  
      return train_spk_list, dev_spk_list, test_spk_list
  
imports: import argparse
  import os
  import random
label_desc: Use image node_id 1 for calling a global function with example usage: get_spk_list(utt2spk_path, min_spk_utt, train_frac, val_frac) and returns: train_spk_list,  dev_spk_list,  test_spk_list