code: def __process_data(data_folder: str, data_set: str):
      """
      To generate manifest
      Args:
          data_folder: source with wav files
      Returns:
  
      """
      fullpath = os.path.abspath(data_folder)
      filelist = glob(fullpath + "/**/*.wav", recursive=True)
      out = os.path.join(fullpath, data_set + "_all.json")
      utt2spk = os.path.join(fullpath, "utt2spk")
      utt2spk_file = open(utt2spk, "w")
      id = -2  # speaker id
  
      if os.path.exists(out):
          logging.warning(
              "%s already exists and is assumed to be processed. If not, please delete %s and rerun this script",
              out,
              out,
          )
          return
  
      speakers = []
      lines = []
      with open(out, "w") as outfile:
          for line in tqdm(filelist):
              line = line.strip()
              y, sr = l.load(line, sr=None)
              if sr != 16000:
                  y, sr = l.load(line, sr=16000)
                  l.output.write_wav(line, y, sr)
              dur = l.get_duration(y=y, sr=sr)
              if data_set == "test":
                  speaker = (
                      line.split("/")[-1].split(".")[0].split("_")[0]
                  )
              else:
                  speaker = line.split("/")[id]
              speaker = list(speaker)
              speaker = "".join(speaker)
              speakers.append(speaker)
              meta = {
                  "audio_filepath": line,
                  "duration": float(dur),
                  "label": speaker,
              }
              lines.append(meta)
              json.dump(meta, outfile)
              outfile.write("\n")
              utt2spk_file.write(
                  line.split("/")[-1] + "\t" + speaker + "\n"
              )
  
      utt2spk_file.close()
  
      if data_set != "test":
          sss = StratifiedShuffleSplit(
              n_splits=1, test_size=0.1, random_state=42
          )
          for train_idx, test_idx in sss.split(speakers, speakers):
              print(len(train_idx))
  
          out = os.path.join(fullpath, "train.json")
          write_file(out, lines, train_idx)
          out = os.path.join(fullpath, "dev.json")
          write_file(out, lines, test_idx)
  
file_path: NeMo/scripts/dataset_processing/speaker_tasks/get_hi-mia_data.py
imports: import argparse
  import json
  import logging
  import os
  import tarfile
  import urllib.request
  from glob import glob
  import librosa
  from sklearn.model_selection import StratifiedShuffleSplit
  from tqdm import tqdm
label_desc: Use image node_id 7 for calling a global function with example usage: __process_data(data_folder, data_set) without return types