code: func RunInTransaction(c context.Context, f func(tc context.Context) error,
  	opts *datastore.TransactionOptions) error {
  
  	return datastore.RunInTransaction(c, func(tc context.Context) error {
  		tx := &transaction{}
  		tc = context.WithValue(tc, &transactionKey, tx)
  		if err := f(tc); err != nil {
  			return err
  		}
  
  		// tx.Unlock() is not called as the tx context should never be called
  		//again so we rather block than allow people to misuse the context.
  		tx.Lock()
  		memcacheCtx, err := memcacheContext(tc)
  		if err != nil {
  			return err
  		}
  		return memcacheSetMulti(memcacheCtx, tx.lockMemcacheItems)
  	}, opts)
  }
docs: // RunInTransaction works just like datastore.RunInTransaction however it
  // interacts correctly with memcache. You should always use this method for
  // transactions if you are using the NDS package.