def is_consistent(x, e):
    """
    Checks for consistency
    (e.g. if e[n] is v, then x[n] must also be v)
    """
    consistent = True
    for n in x:
        if n in e and x[n] != e[n]:
            consistent = False
    return consistent