code: func (e *engineImpl) jobTxn(c context.Context, jobID string, callback txnCallback) error {
  	c = logging.SetField(c, "JobID", jobID)
  	return runTxn(c, func(c context.Context) error {
  		stored := Job{JobID: jobID}
  		err := ds.Get(c, &stored)
  		if err != nil && err != ds.ErrNoSuchEntity {
  			return transient.Tag.Apply(err)
  		}
  		modified := stored // make a copy of Job struct
  		switch err = callback(c, &modified, err == ds.ErrNoSuchEntity); {
  		case err == errSkipPut:
  			return nil // asked to skip the update
  		case err != nil:
  			return err // a real error (transient or fatal)
  		case !modified.IsEqual(&stored):
  			return transient.Tag.Apply(ds.Put(c, &modified))
  		}
  		return nil
  	})
  }
docs: // jobTxn reads Job entity, calls the callback, then dumps the modified entity
  // back into datastore (unless the callback returns errSkipPut).