def __exit__(self, *exc_info):
if not _is_started(self):<EOL><INDENT>raise RuntimeError('<STR_LIT>')<EOL><DEDENT>if self.is_local and self.temp_original is not DEFAULT:<EOL><INDENT>setattr(self.target, self.attribute, self.temp_original)<EOL><DEDENT>else:<EOL><INDENT>delattr(self.target, self.attribute)<EOL>if not self.create and not hasattr(self.target, self.attribute):<EOL><INDENT>setattr(self.target, self.attribute, self.temp_original)<EOL><DEDENT><DEDENT>del self.temp_original<EOL>del self.is_local<EOL>del self.target<EOL>for patcher in reversed(self.additional_patchers):<EOL><INDENT>if _is_started(patcher):<EOL><INDENT>patcher.__exit__(*exc_info)<EOL><DEDENT><DEDENT>
Undo the patch.