Calculate OP (Optimized precision).

    :param ACC: accuracy
    :type ACC : float
    :param TNR: specificity or true negative rate
    :type TNR : float
    :param TPR: sensitivity, recall, hit rate, or true positive rate
    :type TPR : float
    :return: OP as float

def OP_calc(ACC, TPR, TNR):
    """
    Calculate OP (Optimized precision).

    :param ACC: accuracy
    :type ACC : float
    :param TNR: specificity or true negative rate
    :type TNR : float
    :param TPR: sensitivity, recall, hit rate, or true positive rate
    :type TPR : float
    :return: OP as float
    """
    try:
        RI = abs(TNR - TPR) / (TPR + TNR)
        return ACC - RI
    except Exception:
        return "None"