def _Dynamic_AllocateIds(self, allocate_ids_request, allocate_ids_response):
    model_key = allocate_ids_request.model_key()
    size = allocate_ids_request.size()

    self.__ValidateAppId(model_key.app())

    try:
      self.__id_lock.acquire()
      start = self.__next_id
      self.__next_id += size
      end = self.__next_id - 1
    finally:
     self.__id_lock.release()

    allocate_ids_response.set_start(start)
    allocate_ids_response.set_end(end)
dataset/ETHPy150Open CollabQ/CollabQ/.google_appengine/google/appengine/api/datastore_file_stub.py/DatastoreFileStub._Dynamic_AllocateIds/original