code: def comp_norm_mutual_info(p_xy):
      p_x = p_xy.sum(axis=1, keepdims=True)
      p_y = p_xy.sum(axis=0, keepdims=True)
      pmi = np.log(p_xy / np.matmul(p_x, p_y) + 1e-8)
      mi = (p_xy * pmi).sum()
      h_x = comp_entropy(p_x)
      h_y = comp_entropy(p_y)
      return mi, mi / h_x, mi / h_y, h_x, h_y
  
file_path: espnet/egs2/fsc_challenge/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 4 for calling a global function with example usage: comp_norm_mutual_info(p_xy) and returns: mi,  unknown,  unknown,  h_x,  h_y