<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_page_generator(func, start_page=0, page_size=None):
 """ Constructs a generator for retrieving pages from a paginated endpoint. This method is intended for internal use. :param func: Should take parameters ``page_number`` and ``page_size`` and return the corresponding |Page| object. :param start_page: The page to start on. :param page_size: The size of each page. :return: A generator that generates each successive page. """


        # initialize starting values
        page_number = start_page
        more_pages = True

        # continuously request the next page as long as more pages exist
        while more_pages:

            # get next page
            page = func(page_number=page_number, page_size=page_size)

            yield page

            # determine whether more pages exist
            more_pages = page.has_more_pages()
            page_number += 1