code: def collect_data(
      data_dir: Union[Path, str],
      split: str,
      prefix: str,
      src_lang: str,
      tgt_lang: str,
  ) -> List[List[Utterance]]:
      """Collect utterances."""
      data_dir = Path(data_dir) / f"{split}.{src_lang}-{tgt_lang}"
  
      ret = []
      with open(data_dir / f"text.tc.{src_lang}", "r") as f_src, open(
          data_dir / f"text.tc.{tgt_lang}", "r"
      ) as f_tgt, open(data_dir / "wav.scp", "r") as f_wav:
          for src_line, tgt_line, wav_line in zip(f_src, f_tgt, f_wav):
              uttid = tgt_line.split(maxsplit=1)[0]
              assert (
                  src_line.split(maxsplit=1)[0] == uttid
                  and wav_line.split(maxsplit=1)[0] == uttid
              )
  
              audio_file = (
                  wav_line.split("ffmpeg -i ")[-1]
                  .split(" -f wav -ar")[0]
                  .strip()
              )
              assert Path(audio_file).is_file()
              duration = librosa.get_duration(filename=audio_file)
  
              ret.append(
                  [
                      Utterance(
                          utt_id=f"{prefix}_{split}_{uttid}_{src_lang}-{tgt_lang}_asr",
                          wav_id=f"{prefix}_{split}_{uttid}_{src_lang}-{tgt_lang}",
                          wav_path=wav_line.strip().split(maxsplit=1)[
                              -1
                          ],
                          start_time=0.0,
                          end_time=duration,
                          lang=f"<{src_lang.split('-')[0]}>",
                          task="<asr>",
                          text=src_line.strip().split(maxsplit=1)[-1],
                          asr_text=src_line.strip().split(maxsplit=1)[
                              -1
                          ],
                      )
                  ]
              )
              ret.append(
                  [
                      Utterance(
                          utt_id=f"{prefix}_{split}_{uttid}_{src_lang}-{tgt_lang}_st",
                          wav_id=f"{prefix}_{split}_{uttid}_{src_lang}-{tgt_lang}",
                          wav_path=wav_line.strip().split(maxsplit=1)[
                              -1
                          ],
                          start_time=0.0,
                          end_time=duration,
                          lang=f"<{src_lang.split('-')[0]}>",
                          task=f"<st_{tgt_lang.split('-')[0]}>",
                          text=tgt_line.strip().split(maxsplit=1)[-1],
                          asr_text=src_line.strip().split(maxsplit=1)[
                              -1
                          ],
                      )
                  ]
              )
      return ret
  
imports: from argparse import ArgumentParser
  from pathlib import Path
  from typing import Dict, List, Optional, Tuple, Union
  import librosa
  from utils import SYMBOL_NA, SYMBOL_NOSPEECH, SYMBOLS_TIME, LongUtterance, Utterance, generate_long_utterances
label_desc: Use image node_id 1 for calling a global function with example usage: collect_data(data_dir, split, prefix, src_lang, tgt_lang) and returns: ret