def query_pre_approvals(self, initial_date, final_date, page=None,
                            max_results=None):
        last_page = False
        results = []
        while last_page is False:
            search_result = self._consume_query_pre_approvals(
                initial_date, final_date, page, max_results)
            results.extend(search_result.pre_approvals)
            if search_result.current_page is None or \
               search_result.total_pages is None or \
               search_result.current_page == search_result.total_pages:
                last_page = True
            else:
                page = search_result.current_page + 1

        return results
script main.
dataset/ETHPy150Open rochacbruno/python-pagseguro/pagseguro/__init__.py/PagSeguro.query_pre_approvals--crossover with--dataset/ETHPy150Open CGATOxford/cgat/scripts/fastqs2fastq.py/main