def paginated_function(page_size=8, page_offset=0):
            """Returns one page of size page_size, then one page of size page_size - 1."""
            if page_offset > 3 * page_size:
                assert False  # This should not happen.
            elif page_offset > 2 * page_size:
                return (page_size - 1) * "a"
            else:
                return page_size * "a"
Returns one page of size page_size, then one page of size page_size - 1.
tests/api/test_utils.py