def _validate_api_response(data):
    return isinstance(data, dict) and \
           'data' in data and \
           isinstance(data['data'], dict) and \
           'results' in data['data'] and \
           isinstance(data['data']['results'], list) and \
           len(data['data']['results']) > 0 and \
           isinstance(data['data']['results'][0], dict) and \
           'current_version' in data['data']['results'][0] and \
           'current_download_link' in data['data']['results'][0]
dataset/ETHPy150Open Cal-CS-61A-Staff/ok-client/client/utils/software_update.py/_validate_api_response/original