code: def _pop(self, keep_context=False):
          
          self._push_textbuffer()
          self._depth -= 1
          if keep_context:
              context = self._context
              stack = self._stacks.pop()[0]
              self._context = context
              return stack
          return self._stacks.pop()[0]
docs: Pop the current stack/context/textbuffer, returning the stack.
  
          If *keep_context* is ``True``, then we will replace the underlying
          stack's context with the current stack's.