def _Dynamic_RunQuery(self, query, query_result, cursor_id = None):
    # AppScale: Removed previous check because we remotely handle transactions.
    super(RemoteDatastoreStub, self).MakeSyncCall(
          'datastore_v3', 'RunQuery', query, query_result)

    if cursor_id is None:
      self.__local_cursor_lock.acquire()
      try:
        cursor_id = self.__next_local_cursor
        self.__next_local_cursor += 1
      finally:
        self.__local_cursor_lock.release()

    if query_result.more_results():
      query.set_offset(query.offset() + query_result.result_size())
      if query.has_limit():
        query.set_limit(query_result.result_size() - query.limit())
      self.__queries[cursor_id] = query
    else:
      self.__queries[cursor_id] = None


    query_result.mutable_cursor().set_cursor(cursor_id)
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/remote_api/remote_api_stub.py/RemoteDatastoreStub._Dynamic_RunQuery/swapped operands of `-`