def _get_bq_service(credentials=None, service_url=None):

    assert credentials, 'Must provide ServiceAccountCredentials'

    http = credentials.authorize(Http())
    service = build('bigquery', 'v2', http=http,
                    discoveryServiceUrl=service_url)

    return service
Construct an authorized BigQuery service object.
dataset/ETHPy150Open tylertreat/BigQuery-Python/bigquery/client.py/_get_bq_service