parameters: (self, *exc_info)
docstring: Undo the patch.
docstring_summary: Undo the patch.
docstring_tokens: Undo the patch .
function: def __exit__(self, *exc_info):
          """Undo the patch."""
          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):
                  # needed for proxy objects like django settings
                  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)
function_tokens: 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 ) : # needed for proxy objects like django settings 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 )