def _retrieve_result(endpoints, token_header):
        """Prepare the request list and execute them concurrently."""
        request_list = [
            (url, token_header)
            for (task_id, url) in endpoints
        ]

        responses = concurrent_get(request_list)

        # Quick sanity check
        assert len(endpoints) == len(responses)

        responses_dic = {
            task_id: r.content
            for (task_id, _), r in zip(endpoints, responses)
        }
        return responses_dic
def _retrieve_result ( endpoints , token_header ) : request_list = [ ( url , token_header ) for ( task_id , url ) in endpoints ] responses = concurrent_get ( request_list ) assert len ( endpoints ) == len ( responses ) responses_dic = { task_id : r . content for ( task_id , _ ) , r in zip ( endpoints , responses ) } return responses_dic
Prepare the request list and execute them concurrently.