'Undo the patch.'

def __exit__(self, *exc_info):

    if (not _is_started(self)):
        raise RuntimeError('stop    called    on    unstarted    patcher')
    if (self.is_local and (self.temp_original is not DEFAULT)):
        setattr(self.target, self.attribute, self.temp_original)
    else:
        delattr(self.target, self.attribute)
        if ((not self.create) and (not hasattr(self.target, self.attribute))):
            setattr(self.target, self.attribute, self.temp_original)
    del self.temp_original
    del self.is_local
    del self.target
    for patcher in reversed(self.additional_patchers):
        if _is_started(patcher):
            patcher.__exit__(*exc_info)
