code: def _main(uid2refs, uid2hyps, verbose):
      (p_xy, ref2pid, hyp2lid, tot, frmdiff, skipped) = comp_joint_prob(
          uid2refs, uid2hyps
      )
      ref_pur_by_hyp, ref_pur = comp_purity(p_xy, axis=0)
      hyp_pur_by_ref, hyp_pur = comp_purity(p_xy, axis=1)
      (
          mi,
          mi_norm_by_ref,
          mi_norm_by_hyp,
          h_ref,
          h_hyp,
      ) = comp_norm_mutual_info(p_xy)
      outputs = {
          "ref pur": ref_pur,
          "hyp pur": hyp_pur,
          "H(ref)": h_ref,
          "H(hyp)": h_hyp,
          "MI": mi,
          "MI/H(ref)": mi_norm_by_ref,
          "ref segL": comp_avg_seg_dur(uid2refs.values()),
          "hyp segL": comp_avg_seg_dur(uid2hyps.values()),
          "p_xy shape": p_xy.shape,
          "frm tot": tot,
          "frm diff": frmdiff,
          "utt tot": len(uid2refs),
          "utt miss": len(skipped),
      }
      print(
          tabulate([outputs.values()], outputs.keys(), floatfmt=".4f")
      )
  
file_path: espnet/egs2/how2_2000h/asr1/pyscripts/feats/measure_teacher_quality.py
imports: import argparse
  import re
  from collections import Counter
  import numpy
  from tabulate import tabulate
  from espnet2.utils.types import str2bool
label_desc: Use image node_id 12 for calling a global function with example usage: _main(uid2refs, uid2hyps, verbose) without return types