def METHOD_NAME(variant_scalar_rgb):
    bsdf = mi.load_dict({
        'type': 'blendbsdf',
        'nested1': { 'type' : 'diffuse' },
        'nested2': { 'type' : 'diffuse' },
        'weight': 0.2,
    })
    assert bsdf is not None
    assert bsdf.component_count() == 2
    assert bsdf.flags(0) == mi.BSDFFlags.DiffuseReflection | mi.BSDFFlags.FrontSide
    assert bsdf.flags(1) == mi.BSDFFlags.DiffuseReflection | mi.BSDFFlags.FrontSide
    assert bsdf.flags() == bsdf.flags(0) | bsdf.flags(1)
    bsdf = mi.load_dict({
        'type': 'blendbsdf',
        'nested1': { 'type' : 'roughconductor' },
        'nested2': { 'type' : 'diffuse' },
        'weight': 0.2,
    })
    assert bsdf is not None
    assert bsdf.component_count() == 2
    assert bsdf.flags(0) == mi.BSDFFlags.GlossyReflection | mi.BSDFFlags.FrontSide
    assert bsdf.flags(1) == mi.BSDFFlags.DiffuseReflection | mi.BSDFFlags.FrontSide
    assert bsdf.flags() == bsdf.flags(0) | bsdf.flags(1)