code: func NewOpID(c context.Context) (int64, error) {
  	// Note: AllocateIDs modifies passed slice in place, by replacing the keys
  	// there.
  	keys := []*datastore.Key{
  		datastore.NewKey(c, "cas.UploadOperation", "", 0, nil),
  	}
  	if err := datastore.AllocateIDs(c, keys); err != nil {
  		return 0, errors.Annotate(err, "failed to generate upload operation ID").
  			Tag(transient.Tag).Err()
  	}
  	return keys[0].IntID(), nil
  }
docs: // NewOpID returns new unique upload operation ID.