code: def set_result(self, result):
      
  
      with self._lock:
        if self._enqueued:
          raise RuntimeError('can not set result of enqueued Future')
        self._result = result
        self._completed = True
        callbacks = self._prepare_done_callbacks()
      callbacks()
docs: Allows you to set the result of the future without requiring the future
      to actually be executed. This can be used if the result is available
      before the future is run, allowing you to keep the future as the interface
      for retrieving the result data.
  
      :param result: The result of the future.
      :raise RuntimeError: If the future is already enqueued.