def METHOD_NAME(variants_vec_rgb):
    bsdf_front = mi.load_dict({
        'type': 'diffuse',
        'reflectance': {
            'type': 'rgb',
            'value': [0.1, 0.1, 0.1]
        }
    })
    bsdf_back = mi.load_dict({
        'type': 'diffuse',
        'reflectance': {
            'type': 'rgb',
            'value': [0.9, 0.9, 0.9]
        }
    })
    bsdf = mi.load_dict({
        'type': 'twosided',
        'a': bsdf_front,
        'b': bsdf_back,
    })
    si = mi.SurfaceInteraction3f()
    si.t = 0.1
    si.p = [0, 0, 0]
    si.n = [0, 0, 1]
    si.sh_frame = mi.Frame3f(si.n)
    n = 5
    epsilon = 0.0001
    for u in dr.linspace(mi.Float, epsilon, 1 - epsilon, n):
        for v in dr.linspace(mi.Float, epsilon, 1 - epsilon, n):
            si.wi = mi.warp.square_to_uniform_sphere([u / float(n-1),
                                                      v / float(n-1)])
            up = mi.Frame3f.cos_theta(si.wi) > 0.0
            value = bsdf.eval_diffuse_reflectance(si)
            value_front = bsdf_front.eval_diffuse_reflectance(si)
            si.wi.z *= -1
            value_back = bsdf_back.eval_diffuse_reflectance(si)
            assert dr.allclose(dr.select(up, value - value_front, 0), 0.0)
            assert dr.allclose(dr.select(up, 0, value - value_back), 0.0)