<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _teardown(self):
        '''
        Replace the original method.
        '''
        if not self._was_object_method:
            setattr(self._instance, self._attr, self._obj)
        else:
            delattr(self._instance, self._attr)