code: def AUNP_calc(classes, P, POP, AUC_dict):
      """
      Calculate AUNP.
  
      :param classes: confusion matrix classes
      :type classes: list
      :param P: number of actual positives per class
      :type P: dict
      :param POP: population or total number of samples per class
      :type POP: dict
      :param AUC_dict: Area under the ROC curve (AUC) for each class
      :type AUC_dict: dict
      :return: AUNP as float
      """
      try:
          result = 0
          for i in classes:
              result += (P[i] / POP[i]) * AUC_dict[i]
          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 10 for calling a global function with example usage: AUNP_calc(classes, P, POP, AUC_dict) and returns: result, str