def _fetch_results_from_offset(self, query, result_offset,
                                   aux_params={}, headers={},
                                   num_results=-1):
        if num_results == -1:
            num_results = self._results_per_req
        try:
            req_result_count = min(self._results_per_req, num_results-result_offset)

            # add query position to auxilary parameters
            aux_params['q'] = query
            aux_params['start'] = result_offset
            aux_params['rsz'] = req_result_count

            resp = self.get(GOOGLE_OLD_API_ENTRY + GOOGLE_OLD_API_FUNC,
                            params=aux_params, headers=headers)

            # extract list of results from response
            result_dict = resp.json()

            return result_dict['responseData']['results'][:(num_results-result_offset)]

        except requests.exceptions.RequestException:
            return []
dataset/ETHPy150Open kencoken/imsearch-tools/imsearchtools/engines/google_old_api.py/GoogleOldAPISearch._fetch_results_from_offset/original