<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):
        '''
        Overload so that we can clear out the cache after a test run.
        '''
        # __new__ is a super-special case in that even when stubbing a class
        # which implements its own __new__ and subclasses object, the
        # "Class.__new__" reference is a staticmethod and not a method (or
        # function). That confuses the "was_object_method" logic in
        # StubFunction which then fails to delattr and from then on the class
        # is corrupted. So skip that teardown and use a __new__-specific case.
        setattr(self._instance, self._attr, staticmethod(self._new))
        StubNew._cache.pop(self._type)