code: def prepare_single(
      utts: List[Dict],
      wav_id: str,
      max_sec: float = 30,
      resolution: float = 0.02,
  ) -> List[Dict]:
      """Prepare a singe TED talk by generating long utterances with context/prompt."""
  
      new_utts: List[Dict] = []
      uttids: List[str] = []
      for idx in range(len(utts)):
          max_utts = find_max_utts(utts, max_sec, idx)
  
          if max_utts:
              offset = utts[max_utts[0]]["offset"]  # start time
              src = []
              tgt = []
              for u in max_utts:
                  src.extend(
                      [
                          time2token(
                              utts[u]["offset"] - offset, resolution
                          ),
                          " " + utts[u]["src"],  # add space before text
                          time2token(
                              utts[u]["offset"]
                              + utts[u]["duration"]
                              - offset,
                              resolution,
                          ),
                      ]
                  )
                  tgt.extend(
                      [
                          time2token(
                              utts[u]["offset"] - offset, resolution
                          ),
                          " " + utts[u]["tgt"],  # add space before text
                          time2token(
                              utts[u]["offset"]
                              + utts[u]["duration"]
                              - offset,
                              resolution,
                          ),
                      ]
                  )
              src_ctc = [
                  utts[u]["src"] for u in max_utts
              ]  # for ASR CTC
  
              max_prev = find_max_prev(utts, max_sec, idx)
              prev_src = [utts[u]["src"] for u in max_prev]
              prev_tgt = [utts[u]["tgt"] for u in max_prev]
  
              long_utt = {
                  "start": offset,
                  "end": utts[max_utts[-1]]["offset"]
                  + utts[max_utts[-1]]["duration"],
                  "wav": utts[max_utts[0]]["wav"],
                  "src": "".join(
                      src
                  ),  # no space between special tokens
                  "tgt": "".join(
                      tgt
                  ),  # no space between special tokens
                  "src_ctc": " ".join(src_ctc),
                  "prev_src": " ".join(prev_src)
                  if prev_src
                  else "<na>",
                  "prev_tgt": " ".join(prev_tgt)
                  if prev_tgt
                  else "<na>",
              }
              long_utt["utt_id"] = (
                  f"{wav_id}_{round(1000*long_utt['start']):07d}"
                  f"_{round(1000*long_utt['end']):07d}"
              )
  
              if long_utt["utt_id"] not in uttids:
                  uttids.append(long_utt["utt_id"])
                  new_utts.append(long_utt)
              else:
                  print(
                      f"Long utt {long_utt['utt_id']} already exists."
                  )
  
      return new_utts
  
file_path: espnet/egs2/must_c_v2/s2t1/local/data_prep.py
imports: from argparse import ArgumentParser
  from pathlib import Path
  from typing import Dict, List, Optional, Tuple, Union
  import yaml
label_desc: Use image node_id 5 for calling a global function with example usage: prepare_single(utts, wav_id, max_sec, resolution) and returns: new_utts