<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def AUNP_calc(classes, P, POP, AUC_dict):
 """ Calculate AUNP. :param classes: classes :type classes : list :param P: condition positive :type P : dict :param POP: population :type POP : dict :param AUC_dict: AUC (Area under the ROC curve) 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"