def METHOD_NAME(distr, slice_item):
    s = distr.sample().asnumpy()
    sliced = distr[slice_item]
    s_sliced = sliced.sample().asnumpy()
    assert s_sliced.shape == s[slice_item].shape
    y = np.random.uniform(size=BATCH_SHAPE)
    lp_expected = distr.loss(mx.nd.array(y)).asnumpy()[slice_item]
    lp_actual = sliced.loss(mx.nd.array(y[slice_item])).asnumpy()
    assert np.allclose(lp_actual, lp_expected)
    tmp = (
        distr.base_distribution
        if isinstance(distr, TransformedDistribution)
        else distr
    )
    has_quantile_fn = isinstance(tmp, DISTRIBUTIONS_WITH_QUANTILE_FUNCTION)
    if has_quantile_fn:
        for ql in [0.01, 0.1, 0.5, 0.9, 0.99]:
            qs_actual = sliced.quantile(mx.nd.array([ql])).asnumpy()[0]
            qs_expected = distr.quantile(mx.nd.array([ql])).asnumpy()[0][
                slice_item
            ]
            assert np.allclose(qs_actual, qs_expected)