code: def collect_data(examples, split, prefix, lang_id_dict):
      ans = []
      for idx, eg in enumerate(examples):
          text = preprocess_text(eg["raw_transcription"])
          if not len(text) > 0:
              logging.warning(
                  f"skip the example due to empty text: {text}"
              )
              continue
  
          if not Path(eg["audio"]["path"]).is_file():
              logging.warning(
                  f"skip the example due to missing file: {eg['audio']['path']}"
              )
              continue
  
          if eg["language"] not in lang_id_dict:
              logging.warning(
                  f"skip the example due to unknown language: {eg['language']}"
              )
              continue
  
          speech_id = eg["path"].split("/")[-1].replace(".wav", "")
          length = eg["num_samples"] / eg["audio"]["sampling_rate"]
  
          ans.append(
              [
                  Utterance(
                      utt_id=f"{prefix}_{speech_id}",
                      wav_id=f"{prefix}_{speech_id}",
                      wav_path=eg["path"],
                      start_time=0,
                      end_time=length,
                      lang=f"<{lang_id_dict[eg['language']]}>",
                      task="<asr>",
                      text=text,
                      asr_text=text,
                  )
              ]
          )
  
          if idx > 0 and idx % 10 == 0:
              logging.info(f"processed {idx} examples")
      return ans
  
file_path: espnet/egs2/owsm_v3/s2t1/local/prepare_fleurs.py
imports: import argparse
  import logging
  import traceback
  from collections import defaultdict
  from pathlib import Path
  from typing import Dict, List, Optional, Tuple, Union
  from iso639 import languages
  from utils import 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(examples, split, prefix, lang_id_dict) and returns: ans