def METHOD_NAME(variants_vec_backends_once_rgb):
    xml = """<float name="alpha" value="0.5"/>
             <boolean name="sample_visible" value="false"/>
             <string name="distribution" value="beckmann"/>
          """
    wi = dr.normalize(mi.ScalarVector3f(0.5, 0.0, 0.5))
    sample_func, pdf_func = mi.chi2.BSDFAdapter("roughdielectric", xml, wi=wi)
    chi2 = mi.chi2.ChiSquareTest(
        domain=mi.chi2.SphericalDomain(),
        sample_func=sample_func,
        pdf_func=pdf_func,
        sample_dim=3,
        res=201
    )
    assert chi2.run()