<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pop_all(self):
 """ Preserve the context stack by transferring it to a new instance """

        ret = ExitStack()
        ret._context_stack.append(self._context_stack.pop())
        self._context_stack.append([])