code: def collect_data(
      data_dir: Union[Path, str], lang: str, split: str, prefix: str
  ) -> List[List[Utterance]]:
      """Collect utterances in each long talk."""
      data_dir = Path(data_dir) / f"mls_{LANGUAGES[lang]}" / split
      download_dir = data_dir / "audio_long"  # download long audios
      download_dir.mkdir(parents=True, exist_ok=True)
  
      uttid2trans = {}
      with open(data_dir / "transcripts.txt", "r") as fp:
          for line in fp:
              uttid, trans = line.strip().split(maxsplit=1)
              uttid2trans[uttid] = " ".join(trans.split())
  
      url2utts = defaultdict(list)
      with open(data_dir / "segments.txt", "r") as fp:
          for line in fp:
              uttid, url, start_time, end_time = line.strip().split()
              url2utts[url].append(
                  (
                      uttid,
                      float(start_time),
                      float(end_time),
                      uttid2trans[uttid],
                  )
              )
  
      ret = []
      for url, utts in url2utts.items():
          mp3_file = download_dir / url.split("/")[-1]
          if mp3_file.is_file():
              print(f"Skip downloading {mp3_file}")
          else:
              response = request_with_retry(url)
              if response is None:
                  print(f"Failed to download {mp3_file}. Skip it.")
                  continue
              with open(mp3_file, "wb") as fp:
                  fp.write(response.content)
  
          short_utts = []
          for uttid, start_time, end_time, trans in utts:
              short_utts.append(
                  Utterance(
                      utt_id=f"{prefix}_{lang}_{uttid}",
                      wav_id=f"{prefix}_{lang}_{url.split('/')[-1].removesuffix('.mp3')}",
                      wav_path=(
                          f"ffmpeg -i {str(mp3_file.resolve())} -ac 1 -ar 16000 -f"
                          " wav - |"
                      ),
                      start_time=start_time,
                      end_time=end_time,
                      lang=f"<{lang}>",
                      task="<asr>",
                      text=trans,
                      asr_text=trans,
                  )
              )
          ret.append(short_utts)
      return ret
  
file_path: espnet/egs2/owsm_v2/s2t1/local/prepare_multilingual_librispeech.py
imports: import json
  from argparse import ArgumentParser
  from collections import defaultdict
  from pathlib import Path
  from typing import Dict, List, Optional, Tuple, Union
  import requests
  from utils import LANGUAGES, SYMBOL_NA, SYMBOL_NOSPEECH, SYMBOLS_TIME, LongUtterance, Utterance, generate_long_utterances
label_desc: Use image node_id 2 for calling a global function with example usage: collect_data(data_dir, lang, split, prefix) and returns: ret