def __pagination_handler(query_set, model, params):
    """
    Handle user-provided pagination requests.

    Args:
        query_set: SQLAlchemy query set to be paginated.
        model: Data model from which given query set is generated.
        params: User-provided filter params, with format {"offset": <int>, "limit": <int>, ...}.
    Returns:
        A query set with user-provided pagination applied.
    """
    # Offset
    offset = params.get("offset")
    if offset!=None:
        query_set = query_set.offset(offset)
    # Limit
    limit = params.get("limit")
    if limit!=None:
        query_set = query_set.limit(limit)
    return query_set