def _validate_response(url, response):
    if response['status'] not in [GooglePlaces.RESPONSE_STATUS_OK,
                                  GooglePlaces.RESPONSE_STATUS_ZERO_RESULTS]:
        error_detail = ('Request to URL %s failed with response code: %s' %
                        (url, response['status']))
        raise GooglePlacesError(error_detail)
Validates that the response from Google was successful.
dataset/ETHPy150Open slimkrazy/python-google-places/googleplaces/__init__.py/_validate_response