code: def set_exception(self, exception):
          
          self.set_exc_info(
              (exception.__class__,
               exception,
               getattr(exception, '__traceback__', None)))
docs: Sets the exception of a ``Future.``