def check_validity_assignment(binary_constraints, assignment):
    """
    Checks if an assignment is consistent to binary constraints
    """
    for binary_constraint in binary_constraints:
        if binary_constraint[0] not in assignment or binary_constraint[1] not in assignment:
            continue

        if assignment[binary_constraint[0]] == assignment[binary_constraint[1]]:
            return False
    return True