code: def pop(self: BoardT) -> Move:
          
          move = self.move_stack.pop()
          self._stack.pop().restore(self)
          return move
docs: Restores the previous position and returns the last move from the stack.
  
          :raises: :exc:`IndexError` if the stack is empty.