code: def compare_vp(voice_part_old, voice_part_new):
      vn = len(voice_part_old)
      base_dur = 1.2
  
      for i in range(vn):
          diff_st = voice_part_new[i][0] - voice_part_old[i][0]
          diff_ed = voice_part_old[i][1] - voice_part_new[i][1]
          dur_old = voice_part_old[i][1] - voice_part_old[i][0]
          dur_new = voice_part_new[i][1] - voice_part_new[i][0]
          diff_dur = dur_old - dur_new
  
          if 1.0 < diff_st:
              sys.stderr.write(
                  "Warning: StDiff[%4f][%d] is bigger than 1.\n"
                  % (diff_st, i)
              )
          if 1.0 < diff_ed:
              sys.stderr.write(
                  "Warning: EdDiff[%4f][%d] is bigger than 1.\n"
                  % (diff_ed, i)
              )
          if dur_new < 0.5:
              sys.stderr.write(
                  "Warning: NewDur(%4f)[%d] is smaller than 0.5.\n"
                  % (dur_new, i)
              )
          if (diff_dur < 0) or (base_dur < diff_dur):
              sys.stderr.write(
                  "Warning: Diff(%4f)[%d] is out of 0<x<%.2f.\n"
                  % (diff_dur, i, base_dur)
              )
  
file_path: espnet/egs/blizzard17/tts1/local/make_lab_wo_sil.py
imports: import csv
  import sys
  import librosa
  import numpy
label_desc: Use image node_id 6 for calling a global function with example usage: compare_vp(voice_part_old, voice_part_new) without return types