code: def generate_fairseq_manifests(
      manifest, output_path, audio_root=None
  ):
      with open(manifest, "r") as i:
          parses = []
          utterances = []
          filepaths = []
          keys = None
          for idx, line in enumerate(i):
              if idx == 0:
                  keys = line.strip().split("\t")
              else:
                  data = {
                      k: v for (k, v) in zip(keys, line.split("\t"))
                  }
                  parses.append(
                      get_insl_frame(
                          data["decoupled_normalized_seqlogical"]
                      )
                  )
                  utterances.append(
                      sequencify_utterance(data["normalized_utterance"])
                  )
                  filepaths.append(data["file_id"])
  
      parses_fp = output_path.with_suffix(".parse")
      with open(str(parses_fp), "w") as o:
          for p in parses:
              o.write(p + "\n")
  
      utterances_fp = output_path.with_suffix(".ltr")
      with open(str(utterances_fp), "w") as o:
          for u in utterances:
              o.write(u + "\n")
  
      filepaths_fp = output_path.with_suffix(".tsv")
      with open(str(filepaths_fp), "w") as o:
          o.write(str(audio_root) + "\n")
          for f in filepaths:
              fullpath = audio_root / f
              assert fullpath.exists(), f"{fullpath}"
              frames = soundfile.info(fullpath).frames
              o.write(f"{f}\t{frames}\n")
  
imports: import argparse
  from pathlib import Path
  import soundfile
label_desc: Use image node_id 3 for calling a global function with example usage: generate_fairseq_manifests(manifest, output_path, audio_root) without return types