code: def construct(cls, attempt_number, value, has_exception):
          
          fut = cls(attempt_number)
          if has_exception:
              fut.set_exception(value)
          else:
              fut.set_result(value)
          return fut
docs: Construct a new Future object.