<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def revert(self, strip=0, root=None):
 """ apply patch in reverse order """

    reverted = copy.deepcopy(self)
    reverted._reverse()
    return reverted.apply(strip, root)