code: def process_subset(args, set_name, data):
      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"),
      )
  
      for segment in data:
          process_utterance(
              writer,
              wavscp,
              text,
              utt2spk,
              label,
              os.path.join(args.src_data),
              args.wav_dumpdir,
              segment,
              tgt_sr=args.sr,
          )
  
file_path: espnet/egs2/m4singer/svs1/local/data_prep.py
imports: import argparse
  import json
  import os
  import random
  import shutil
  import librosa
  import miditoolkit
  import numpy
  from espnet2.fileio.score_scp import SingingScoreWriter
label_desc: Use image node_id 5 for calling a global function with example usage: process_subset(args, set_name, data) without return types