Python 3.10 is now available in preview.

google.appengine.datastore.datastore_stub_util.ToScatteredId

Map counter value v to the scattered ID space.

Translate to scattered ID space, then reverse bits.

v Counter value from which to produce ID.

Integer ID.

datastore_errors.BadArgumentError if counter value exceeds the range of

the scattered ID space.