def google_api_get(email, url):
    headers = dict(
        Authorization="Bearer %s" % get_google_access_token(email),
    )
    r = requests.get(url, headers=headers)
    logger.info("I got a %s", r.status_code)
    if r.status_code == 401:
        # Go use the refresh token
        refresh_authorization(email)
        r = requests.get(url, headers=headers)
        logger.info("I got a %s", r.status_code)
    if r.status_code == 200:
        try:
            return r.json()
        except __HOLE__:
            return r.text
dataset/ETHPy150Open coddingtonbear/django-mailbox/django_mailbox/google_utils.py/google_api_get