def _snapState(self): s_id = Database.upsertState(self.s) if s_id not in self.q: self.q[s_id] = {} return s_id