def AUC_calc(item, TPR):
    """
    Calculate AUC/AUPR (Area under the ROC/PR curve for each class).

    :param item: TNR or 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'
