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

def get(self):
        '''Get the wrapped object.'''
        if (self.obj is None) or (time.time() >= self.expires):
            with self.lock:
                self.expires, self.obj = self.factory()
                if isinstance(self.obj, BaseException):
                    self.exception = self.obj
                else:
                    self.exception = None

        if self.exception:
            raise self.exception
        else:
            return self.obj