<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_failure(self, exception=None):
 """ This returns an object implementing IFailedFuture. If exception is None (the default) we MUST be called within an "except" block (such that sys.exc_info() returns useful information). """

        if exception:
            return FailedFuture(type(exception), exception, None)
        return FailedFuture(*sys.exc_info())