def METHOD_NAME(variant_scalar_rgb):
    angle = 80 * dr.pi / 180
    ctx = mi.BSDFContext()
    si = mi.SurfaceInteraction3f()
    wi = [dr.sin(angle), 0, dr.cos(angle)]
    si.wi = wi
    bsdf = example_bsdf()
    bs, spec = bsdf.sample(ctx, si, 0, [0, 0])
    assert dr.allclose(bs.pdf, 0.387704354691473)
    assert dr.allclose(bs.wo, [-dr.sin(angle), 0, dr.cos(angle)])
    bs, spec = bsdf.sample(ctx, si, 1, [0, 0])
    angle = 41.03641052520335 * dr.pi / 180
    assert dr.allclose(bs.pdf, 1 - 0.387704354691473)
    assert dr.allclose(bs.wo, [-dr.sin(angle), 0, -dr.cos(angle)])
    si.wi = bs.wo
    bs, spec = bsdf.sample(ctx, si, 1, [0, 0])
    assert dr.allclose(bs.pdf, 1 - 0.387704354691473)
    assert dr.allclose(bs.wo, wi)