def _node_from_int(uid, bdd, cache):
    """Return `bdd` node `u` from integer `uid`."""
    if uid == -1:
        return bdd.false
    elif uid == 1:
        return bdd.true
    # not constant
    k = cache[str(abs(uid))]
    u = bdd._add_int(k)
    return ~ u if uid < 0 else u