def authorize_and_get_bq_service():
    credentials = GoogleCredentials.get_application_default().create_scoped(['https://www.googleapis.com/auth/bigquery'])
    http = Http()
    http = credentials.authorize(http)
    bigquery_service = build('bigquery', 'v2', http=http)
    return bigquery_service
def authorize_and_get_bq_service():
    credentials = GoogleCredentials.get_application_default().create_scoped(['https://www.googleapis.com/auth/bigquery'])
    http = Http()
    http = credentials.authorize(http)
    bigquery_service = build('bigquery', 'v2', http=http)
    return bigquery_service