code: def process_subset(args, set_name, tempos):
      makedir(os.path.join(args.tgt_dir, set_name))
      wavscp = open(
          os.path.join(args.tgt_dir, set_name, "wav.scp"),
          "w",
          encoding="utf-8",
      )
      label = open(
          os.path.join(args.tgt_dir, set_name, "label"),
          "w",
          encoding="utf-8",
      )
      text = open(
          os.path.join(args.tgt_dir, set_name, "text"),
          "w",
          encoding="utf-8",
      )
      utt2spk = open(
          os.path.join(args.tgt_dir, set_name, "utt2spk"),
          "w",
          encoding="utf-8",
      )
      writer = SingingScoreWriter(
          args.score_dump,
          os.path.join(args.tgt_dir, set_name, "score.scp"),
      )
  
      midi_mapping = load_midi_note_scp(args.midi_note_scp)
  
      with open(
          os.path.join(args.src_data, "segments", set_name + ".txt"),
          "r",
          encoding="utf-8",
      ) as f:
          segments = f.read().strip().split("\n")
          for segment in segments:
              process_utterance(
                  writer,
                  wavscp,
                  text,
                  utt2spk,
                  label,
                  os.path.join(args.src_data, "segments", "wavs"),
                  args.wav_dumpdir,
                  segment,
                  midi_mapping,
                  tempos,
                  tgt_sr=args.sr,
              )
  
file_path: espnet/egs2/opencpop/svs1/local/data_prep.py
imports: import argparse
  import os
  import shutil
  import librosa
  import miditoolkit
  import numpy
  from espnet2.fileio.score_scp import SingingScoreWriter
label_desc: Use image node_id 6 for calling a global function with example usage: process_subset(args, set_name, tempos) without return types