def METHOD_NAME(data):
    if not all([isinstance(data, dict),
                data.pop('status', 200) != 401,
                data.pop('message', '') != 'Invalid API key']):
        log.warning('Invalid api key. Check your settings')
        return False
    return True