<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def joint_entropy_calc(classes, table, POP):
 """ Calculate joint entropy. :param classes: confusion matrix classes :type classes : list :param table: confusion matrix table :type table : dict :param POP: population :type POP : dict :return: joint entropy as float """

    try:
        result = 0
        for i in classes:
            for index, j in enumerate(classes):
                p_prime = table[i][j] / POP[i]
                if p_prime != 0:
                    result += p_prime * math.log(p_prime, 2)
        return -result
    except Exception:
        return "None"