code: def merge_short_utterances(
      utts: List[Utterance], prev: Optional[LongUtterance] = None
  ) -> LongUtterance:
      """Merge a list of utterances to create a long utterance."""
  
      wav_id = utts[0].wav_id
      wav_path = utts[0].wav_path
      start_time = utts[0].start_time
      end_time = utts[-1].end_time
      lang = utts[0].lang
      task = utts[0].task
      utt_id = (
          f"{wav_id}_{round(1000 * start_time):09d}_"
          f"{round(1000 * end_time):09d}_{lang[1:-1]}_{task[1:-1]}"
      )
      text = " ".join([u.text for u in utts])
      asr_text = " ".join([u.asr_text for u in utts])
      prev_text = prev.text if prev is not None else SYMBOL_NA
  
      text_with_time = ""
      for u in utts:
          text_with_time += (
              f"{time2token(u.start_time - start_time)} "
              f"{u.text.strip()}{time2token(u.end_time - start_time)}"
          )
  
      return LongUtterance(
          utt_id=utt_id,
          wav_id=wav_id,
          wav_path=wav_path,
          start_time=start_time,
          end_time=end_time,
          lang=lang,
          task=task,
          text=text,
          asr_text=asr_text,
          prev_text=prev_text,
          text_with_time=text_with_time,
      )
  
file_path: espnet/egs2/owsm_v1/s2t1/local/utils.py
imports: from dataclasses import dataclass
  from pathlib import Path
  from typing import Dict, List, Optional, Tuple, Union
label_desc: Use image node_id 2 for calling a global function with example usage: merge_short_utterances(utts, prev) and returns: LongUtterance