code: def pop_all(self):
          
          ret = ExitStack()
          ret._context_stack.append(self._context_stack.pop())
          self._context_stack.append([])
docs: Preserve the context stack by transferring it to a new instance