code: def AUC_calc(item, TPR):
      """
      Calculate Area under the ROC/PR curve for each class (AUC/AUPR).
  
      :param item: True negative rate (TNR) or Positive predictive value (PPV)
      :type item: float
      :param TPR: sensitivity, recall, hit rate, or true positive rate
      :type TPR: float
      :return: AUC/AUPR as float
      """
      try:
          return (item + TPR) / 2
      except TypeError:
          return "None"
  
imports: from __future__ import division
  import math
  from .pycm_util import normal_quantile
  from .pycm_interpret import *
  from .pycm_param import CLASS_PARAMS
label_desc: Use image node_id 26 for calling a global function with example usage: AUC_calc(item, TPR) and returns: unknown, str