code: func GenerateTokenID(c context.Context, kind string) (int64, error) {
  	// Note: AllocateIDs modifies passed slice in place, by replacing the keys
  	// there.
  	keys := []*datastore.Key{
  		datastore.NewKey(c, kind, "", 0, nil),
  	}
  	if err := datastore.AllocateIDs(c, keys); err != nil {
  		return 0, transient.Tag.Apply(err)
  	}
  	return keys[0].IntID(), nil
  }
docs: // GenerateTokenID produces an int64 that can be used as a token identifier.
  //
  // We reuse datastore ID generator to produce token ids. The tokens are not
  // actually stored in the datastore. The generated ID sequence is associated
  // with some entity kind (indicated via 'kind'). If we ever need to restart the
  // ID sequence, this kind can be changed.