def _Dynamic_AllocateIds(self, request, response):
    """Handle AllocateIds and route remotely if it matches the target app.

    Args:
      request: A datastore_pb.AllocateIdsRequest
      response: A datastore_pb.AllocateIdsResponse
    """
    if request.model_key().app() == self.target_appid:
      self._MakeRemoteSyncCall('datastore_v3', 'AllocateIds', request, response)
    else:
      self.normal_stub.MakeSyncCall('datastore_v3', 'AllocateIds', request,
                                    response)
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/datastore_admin/remote_api_put_stub.py/DatastorePutStub._Dynamic_AllocateIds/original