'Synchronous AllocateIds operation.
Exactly one of size and max must be specified.
Args:
key: A user-level key object.
size: Optional number of IDs to allocate.
max: Optional maximum ID to allocate.
Returns:
A pair (start, end) giving the (inclusive) range of IDs allocation.'

def allocate_ids(self, key, size=None, max=None):

    return self.async_allocate_ids(None, key, size, max).get_result()
