@classmethod<EOL><INDENT>def _allocate_ids_async(cls, size=None, max=None, parent=None,<EOL>**ctx_options):<DEDENT>
from . import tasklets<EOL>ctx = tasklets.get_context()<EOL>cls._pre_allocate_ids_hook(size, max, parent)<EOL>key = Key(cls._get_kind(), None, parent=parent)<EOL>fut = ctx.allocate_ids(key, size=size, max=max, **ctx_options)<EOL>post_hook = cls._post_allocate_ids_hook<EOL>if not cls._is_default_hook(Model._default_post_allocate_ids_hook,<EOL>post_hook):<EOL><INDENT>fut.add_immediate_callback(post_hook, size, max, parent, fut)<EOL><DEDENT>return fut<EOL>
Allocates a range of key IDs for this model class.

        This is the asynchronous version of Model._allocate_ids().