code: def create_score(uid, phns, midis, syb_dur, keep):
      # Transfer into 'score' format
      assert len(phns) == len(midis)
      assert len(midis) == len(syb_dur)
      assert len(syb_dur) == len(keep)
      lyrics_seq = []
      midis_seq = []
      segs_seq = []
      phns_seq = []
      st = 0
      index_phn = 0
      note_list = []
      while index_phn < len(phns):
          midi = midis[index_phn]
          note_info = [st]
          st += syb_dur[index_phn]
          syb = [phns[index_phn]]
          index_phn += 1
          if (
              index_phn < len(phns)
              and syb_dur[index_phn] == syb_dur[index_phn - 1]
              and midis[index_phn] == midis[index_phn - 1]
              and keep[index_phn] == 0
          ):
              syb.append(phns[index_phn])
              index_phn += 1
          syb = "_".join(syb)
          note_info.extend([st, syb, midi, syb])
          note_list.append(note_info)
          # multi notes in one syllable
          while (
              index_phn < len(phns)
              and keep[index_phn] == 1
              and phns[index_phn] == phns[index_phn - 1]
          ):
              note_info = [st]
              st += syb_dur[index_phn]
              note_info.extend(
                  [st, "—", midis[index_phn], phns[index_phn]]
              )
              note_list.append(note_info)
              index_phn += 1
      return note_list
  
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 4 for calling a global function with example usage: create_score(uid, phns, midis, syb_dur, keep) and returns: note_list