<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def convex_combination(classes, TP, TOP, P, class_name, modified=False):
 """ Calculate Overall_CEN coefficient. :param classes: classes :type classes : list :param TP: true Positive Dict For All Classes :type TP : dict :param TOP: test outcome positive :type TOP : dict :param P: condition positive :type P : dict :param class_name: reviewed class name :type class_name : any valid type :param modified : modified mode flag :type modified : bool :return: coefficient as float """

    try:
        class_number = len(classes)
        alpha = 1
        if class_number == 2:
            alpha = 0
        matrix_sum = sum(list(TOP.values()))
        TP_sum = sum(list(TP.values()))
        up = TOP[class_name] + P[class_name]
        down = 2 * matrix_sum
        if modified:
            down -= (alpha * TP_sum)
            up -= TP[class_name]
        return up / down
    except Exception:
        return "None"