def METHOD_NAME(response, expected_errors):
    expected_error, expected_message = expected_errors["response_to_dict_error"]
    predict_raw_response = RawResponseMock(*response)
    predict_response = HttpPredictResponse(predict_raw_response)
    with pytest.raises(expected_error) as error:
        predict_response.to_dict()
    assert expected_message in str(error.value)