def micro_calc(TP, item):
    """
    Calculate PPV_Micro and TPR_Micro.

    :param TP: true positive
    :type TP:dict
    :param item: FN or FP
    :type item : dict
    :return: PPV_Micro or TPR_Micro as float
    """
    try:
        TP_sum = sum(TP.values())
        item_sum = sum(item.values())
        return TP_sum / (TP_sum + item_sum)
    except Exception:
        return "None"
Calculate PPV_Micro and TPR_Micro.

    :param TP: true positive
    :type TP:dict
    :param item: FN or FP
    :type item : dict
    :return: PPV_Micro or TPR_Micro as float