def __contains__(self, key):
        try:
            if key in self._dict:
                state = self._dict[key]
                o = state.obj()
            else:
                return False
        except __HOLE__:
            return False
        else:
            return o is not None
dataset/ETHPy150Open zzzeek/sqlalchemy/lib/sqlalchemy/orm/identity.py/WeakInstanceDict.__contains__