def pages_sorted_by_page_no(book_pages, reverse=False):
    """Return a list of book_page Row instances sorted by page_no.

    Args:
        list of BookPage instances

    Returns:
        list of BookPage instances, sorted
    """
    return sorted(
        book_pages,
        key=lambda k: k.page_no,
        reverse=reverse,
    )