code: def lid_parse(ref_path, hyp_path):
      def read_lid(path):
          res = {}
          for line in read_lines(path):
              try:
                  isos, utt_id = get_info_from_raw_line(line)
              except Exception:
                  print(line)
                  raise
              res[utt_id] = isos
          return res
  
      lid_info = []
      ref_lid_info = read_lid(ref_path)
      hyp_lid_info = read_lid(hyp_path)
      for utt_id, hyp_isos in hyp_lid_info.items():
          assert (
              utt_id in ref_lid_info
          ), f"Can not find groundtruth of utterance ({utt_id}) in {ref_path}."
          assert (
              len(ref_lid_info[utt_id]) == 1
          ), f"Utternace ({utt_id}) should have exactly one LID in {ref_path}."
          if len(hyp_isos) == 0:
              hyp_isos.append("[UNK]")
          ref_iso = ref_lid_info[utt_id][0]
          hyp_iso = hyp_isos[0]
          lid_info.append(f"{ref_iso}\t{hyp_iso}\t({utt_id}-{utt_id})")
  
      return lid_info
  
imports: import argparse
  import glob
  import json
  import os
  import re
  from typing import Callable, List
  from linguistic_tree import LanguageTree
  from espnet2.utils.types import str2bool
label_desc: Use image node_id 5 for calling a global function with example usage: lid_parse(ref_path, hyp_path) and returns: lid_info, res