code: def parse_manifest(manifest, dictionary):
      audio_files = []
      codes = []
      durations = []
      speakers = []
  
      with open(manifest) as info:
          for line in info.readlines():
              sample = eval(line.strip())
              if "cpc_km100" in sample:
                  k = "cpc_km100"
              elif "hubert_km100" in sample:
                  k = "hubert_km100"
              elif "phone" in sample:
                  k = "phone"
              else:
                  assert False, "unknown format"
              code = sample[k]
              code, duration = parse_code(
                  code, dictionary, append_eos=True
              )
  
              codes.append(code)
              durations.append(duration)
              audio_files.append(sample["audio"])
              speakers.append(sample.get("speaker", None))
  
      return audio_files, codes, durations, speakers
  
imports: import json
  import logging
  import os
  import random
  from pathlib import Path
  import numpy
  import torch
  import torch.utils.data
  from .None import data_utils
  from fairseq.data.fairseq_dataset import FairseqDataset
label_desc: Use image node_id 6 for calling a global function with example usage: parse_manifest(manifest, dictionary) and returns: audio_files,  codes,  durations,  speakers