code: def process_subset(args, set_name):
      writer = SingingScoreWriter(
          args.score_dump,
          os.path.join(args.tgt_dir, set_name, "score.scp"),
      )
      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",
      )
  
      midi_mapping = load_midi_note_scp(args.midi_note_scp)
  
      for label_file in os.listdir(
          os.path.join(args.src_data, "labels", "full")
      ):
          if set_name == "train" and not train_check(label_file):
              continue
          elif set_name == "eval" and not test_check(label_file):
              continue
          elif set_name == "dev" and not dev_check(label_file):
              continue
  
          label_id = label_file.split(".")[0]
          process_utterance(
              writer,
              wavscp,
              text,
              utt2spk,
              label,
              os.path.join(args.src_data, "raw"),
              args.wav_dumpdir,
              label_id,
              os.path.join(args.src_data, "labels", "full", label_file),
              os.path.join(args.src_data, "labels", "mono", label_file),
              midi_mapping,
              tgt_sr=args.sr,
          )
  
file_path: espnet/egs2/nit_song070/svs1/local/data_prep.py
imports: import argparse
  import os
  import librosa
  import numpy
  import soundfile
  from espnet2.fileio.score_scp import SingingScoreWriter
label_desc: Use image node_id 8 for calling a global function with example usage: process_subset(args, set_name) without return types