def check_clause(clause, implication_graph):
    """Check the clause

        If the clause infers contradiction, return False
        
        If all literals but one are assigned value 0, use unit resolution, return the valuable and it's assignment
        
        Else, we can't get anything useful from this clause, return None

    """
    num_unassigned = 0
    clause_value = 0
    unit_variable, unit_value = None, None
    for a, b in clause:
        if a in implication_graph:
            if b == implication_graph[a][1]:
                clause_value = 1

        if not a in implication_graph:
            if num_unassigned == 0:
                unit_variable, unit_value = a, b
                num_unassigned = 1
            else: 
                return None

    if num_unassigned == 1 and clause_value == 0:
        return unit_variable, unit_value
    else:
        if clause_value == 0:
            return False
        else:
            return None