code: def popState(self):
          
          diff = self._states.pop() - len(self)
          if diff:
              self.extend(self._hidden[-diff:])
              del self._hidden[-diff:]
docs: Restore domain state from the top of the stack
  
          Variables hidden since the last popped state are then available
          again.