def result_type_match(pred, target, result_type):
    """
    Verifies nature of prediction and target given a result_type.
    """
    if result_type == 'T' and pred == target:
        return True
    if result_type == 'F' and pred != target:
        return True
    if result_type == 'TP' and pred == target and target == 1:
        return True
    if result_type == 'FP' and pred != target and target == 0:
        return True
    if result_type == 'TN' and pred == target and target == 0:
        return True
    if result_type == 'FN' and pred != target and target == 1:
        return True

    return False