code: func (r *runner) doReturnStage(stg *jobsim.ReturnStage) error {
  	retval := int64(0)
  	if stg != nil {
  		retval += stg.Retval
  	}
  	if r.state != nil {
  		retval += r.state.Sum
  	}
  
  	_, err := r.dmc.FinishAttempt(r.c, &dm.FinishAttemptReq{
  		Auth: r.auth,
  		Data: executionResult(true, retval, google.TimeFromProto(stg.GetExpiration())),
  	})
  	if err != nil {
  		logging.WithError(err).Warningf(r.c, "got error on FinishAttempt")
  	}
  	return err
  }
docs: // doReturnStage implements the FinishAttempt portion of the DM Attempt
  // lifecycle. This sets the final result for the Attempt, and will prevent any
  // further executions of this Attempt. This is analogous to the recipe returning
  // a final result.