code: def entropy_calc(item, POP):
      """
      Calculate Reference and Response likelihood.
  
      :param item: number of positives in actual or predict vector per class (P or TOP)
      :type item: dict
      :param POP: population or total number of samples per class
      :type POP: dict
      :return: Reference or Response likelihood as float
      """
      try:
          result = 0
          for i in item.keys():
              likelihood = item[i] / POP[i]
              if likelihood != 0:
                  result += likelihood * math.log(likelihood, 2)
          return -result
      except Exception:
          return "None"
  
imports: from __future__ import division
  import math
  import operator
  from functools import reduce
  from .pycm_interpret import *
  from .pycm_ci import kappa_SE_calc, CI_calc, SE_calc
  from .pycm_util import complement
label_desc: Use image node_id 21 for calling a global function with example usage: entropy_calc(item, POP) and returns: unknown, str