def METHOD_NAME(shape, dim, smooth):
    def model():
        with pyro.plate_stack("plates", shape[:dim]):
            with pyro.plate("particles", 10000):
                pyro.sample("x", dist.Uniform(0, 1).expand(shape).to_event(-dim))
    value = poutine.trace(model).get_trace().nodes["x"]["value"]
    expected_probe = get_moments(value)
    reparam_model = poutine.reparam(
        model, {"x": DiscreteCosineReparam(dim=dim, smooth=smooth)}
    )
    trace = poutine.trace(reparam_model).get_trace()
    assert isinstance(trace.nodes["x_dct"]["fn"], dist.TransformedDistribution)
    assert isinstance(trace.nodes["x"]["fn"], dist.Delta)
    value = trace.nodes["x"]["value"]
    actual_probe = get_moments(value)
    assert_close(actual_probe, expected_probe, atol=0.1)