def METHOD_NAME(outputs_dict, model_name, model_version,
                                       expected_outputs):
    predict_raw_response = PredictResponse()
    predict_raw_response.model_spec.name = model_name
    predict_raw_response.model_spec.version.value = model_version
    for key, value in outputs_dict.items():
        predict_raw_response.outputs[key].CopyFrom(value)
    predict_response = GrpcPredictResponse(predict_raw_response)
    response_dict = predict_response.to_dict()
    assert isinstance(response_dict, dict)
    assert "outputs" in response_dict
    assert len(response_dict) == 1
    raw_response = predict_response.raw_response
    if isinstance(response_dict["outputs"], dict):
        for output_name, array in response_dict["outputs"].items():
            assert output_name in raw_response.outputs.keys()
            assert type(array) is ndarray
            assert array_equal(array, expected_outputs[output_name])
    else:
        assert type(response_dict["outputs"]) is ndarray
        assert array_equal(response_dict["outputs"], expected_outputs)