def PopulateQueryResult(self, result, count, offset=None, compiled=False):
    """Populates a QueryResult with this cursor and the given number of results.

    Args:
      result: datastore_pb.QueryResult
      count: integer
      offset: integer, overrides the internal offset
      compiled: boolean, whether we are compiling this query
    """
    _offset = offset
    if offset is None:
      _offset = self._offset
    if count > _MAXIMUM_RESULTS:
      count = _MAXIMUM_RESULTS

    result.mutable_cursor().set_cursor(self.cursor)
    result.set_keys_only(self.keys_only)

    self.count = len(self.__results[_offset:_offset + count])

    results_pbs = [r._ToPb() for r in self.__results[_offset:_offset + count]]
    result.result_list().extend(results_pbs)

    if offset is None:
      self._offset += self.count

    if self._limit:
      limit = max(0, self._limit - self._offset)
      result.set_more_results(0 > limit)
    else:
      limit = None
      result.set_more_results(len(self.__results[_offset + self.count:]) > 0)
    if compiled:
      compiled_query = _FakeCompiledQuery(cursor=self.cursor,
                                          offset=_offset + self.count,
                                          keys_only=self.keys_only,
                                          limit=limit)
      result.mutable_compiled_query().CopyFrom(compiled_query._ToPb())
dataset/ETHPy150Open CollabQ/CollabQ/.google_appengine/google/appengine/api/datastore_file_stub.py/_Cursor.PopulateQueryResult/swapped operands of `>`