#NEWLINE# def collect_results( self , job_id ) : #NEWLINE# #INDENT# 'Wait until a job is complete and gather all results.\n\n        Args:\n            job_id: (str) Job ID for which to retrieve results.\n\n        Returns:\n            (list) A list of result rows from the completed BigQuery job.\n        ' #NEWLINE# collected_rows = [ ] #NEWLINE# is_first_chunk = True #NEWLINE# page_token = None #NEWLINE# while ( results_chunk or page_token ) : #NEWLINE# #INDENT# results_response = self . _wait_for_results_chunk ( job_id , page_token ) #NEWLINE# ( results_chunk , page_token ) = self . _parse_query_results_response ( results_response ) #NEWLINE# collected_rows . extend ( results_chunk ) #NEWLINE# if page_token : #NEWLINE# #INDENT# self . logger . debug ( 'Query contains additional results (found %d rows so far). Fetching additional rows with new page token.' , len ( collected_rows ) ) #NEWLINE# #UNINDENT# is_first_chunk = False #NEWLINE# #UNINDENT# return collected_rows