def __contains__(self, key):
        try:
            if dict.__contains__(self, key):
                state = dict.__getitem__(self, key)
                o = state.obj()
            else:
                return False
        except __HOLE__:
            return False
        else:
            return o is not None
dataset/ETHPy150Open RoseOu/flasky/venv/lib/python2.7/site-packages/sqlalchemy/orm/identity.py/WeakInstanceDict.__contains__