def _paginate(request, queryset):
  page = int(request.GET.get('page', 1))
  limit = int(request.GET.get('limit', 0))

  if limit > 0:
    offset = (page - 1) * limit
    last = offset + limit
    queryset = queryset.all()[offset:last]

  return {
    'documents': queryset,
    'page': page,
    'limit': limit
  }
The predicate's name and the tuples satisfying it.
dataset/ETHPy150Open cloudera/hue/desktop/core/src/desktop/api2.py/_paginate--crossover with--dataset/ETHPy150Open anzev/hedwig/hedwig/core/predicate.py/BinaryPredicate.__init__