@wraps(decorated)
def inner(*args, **kwargs):
    api_key = args[0]._api_key
    if (not is_authenticated(api_key)):
        get_logger().warn("Mona's client is not authenticated")
        return False
    if _should_refresh_token(api_key):
        with authentication_lock:
            if _should_refresh_token(api_key):
                did_refresh_token = _refresh_token(api_key)
                if (not did_refresh_token):
                    return False
    return decorated(*args, **kwargs)
@wraps(decorated)
def inner(*args, **kwargs):
    api_key = args[0]._api_key
    if (not is_authenticated(api_key)):
        get_logger().warn("Mona's client is not authenticated")
        return False
    if _should_refresh_token(api_key):
        with authentication_lock:
            if _should_refresh_token(api_key):
                did_refresh_token = _refresh_token(api_key)
                if (not did_refresh_token):
                    return False
    return decorated(*args, **kwargs)