def METHOD_NAME(mocker, response, is_error):
    """Verify that CfnClient.stack_exists behaves as expected."""
    should_exist = not is_error
    mock_aws_api(mocker)
    mocker.patch("pcluster.aws.cfn.CfnClient.describe_stack", side_effect=response)
    assert_that(_DummyAWSApi().instance().cfn.stack_exists(FAKE_STACK_NAME)).is_equal_to(should_exist)