code: def collect_data(
      data_dir: Union[Path, str], split: str, prefix: str
  ) -> List[List[Utterance]]:
      """Collect utterances."""
      data_dir = Path(data_dir)
  
      name2text = {}
      with open(
          data_dir
          / "data_aishell"
          / "transcript"
          / "aishell_transcript_v0.8.txt",
          "r",
      ) as fp:
          for line in fp.readlines():
              name, text = line.split(maxsplit=1)
              name2text[name] = "".join(text.split())
  
      ret = []
      for wav_file in (data_dir / "data_aishell" / "wav" / split).glob(
          "*/*.wav"
      ):
          if wav_file.name.removesuffix(".wav") in name2text:
              text = name2text[wav_file.name.removesuffix(".wav")]
              ret.append(
                  [
                      Utterance(
                          utt_id=f"{prefix}_{wav_file.name.removesuffix('.wav')}",
                          wav_id=f"{prefix}_{wav_file.name.removesuffix('.wav')}",
                          wav_path=str(wav_file.resolve()),
                          start_time=0.0,
                          end_time=librosa.get_duration(
                              filename=wav_file
                          ),
                          lang="<zh>",
                          task="<asr>",
                          text=text,
                          asr_text=text,
                      )
                  ]
              )
      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) and returns: ret