code: def collect_data(
      data_dir: Union[Path, str], split: str, prefix: str
  ) -> List[List[Utterance]]:
      """Collect utterances."""
      data_dir = Path(data_dir)
  
      with open(data_dir / f"{split}.csv", "r") as fp:
          lines = [line.strip() for line in fp.readlines()]
          lines = lines[1:]  # skip header
  
      ret = []
      for line in lines:
          wav_rel_path, _, trans = line.split("|")
          wav_abs_path = data_dir / "spgispeech" / split / wav_rel_path
          ret.append(
              [
                  Utterance(
                      utt_id=(
                          f"{prefix}_{split}_"
                          f"{wav_rel_path.removesuffix('.wav').replace('/', '_')}"
                      ),
                      wav_id=(
                          f"{prefix}_{split}_"
                          f"{wav_rel_path.removesuffix('.wav').replace('/', '_')}"
                      ),
                      wav_path=str(wav_abs_path.resolve()),
                      start_time=0.0,
                      end_time=librosa.get_duration(
                          filename=wav_abs_path
                      ),
                      lang="<en>",
                      task="<asr>",
                      text=trans,
                      asr_text=trans,
                  )
              ]
          )
      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