def METHOD_NAME(variant_scalar_rgb):
    # Phase function table definition
    import numpy as np
    ref_y = np.array([0.5, 1.0, 1.5])
    ref_x = np.linspace(-1, 1, len(ref_y))
    ref_integral = np.trapz(ref_y, ref_x)
    # Initialise as isotropic and update with parameters
    phase = mi.load_dict({"type": "tabphase", "values": "1, 1, 1"})
    params = mi.traverse(phase)
    params["values"] = [0.5, 1.0, 1.5]
    params.update()
    # Distribution parameters are updated
    params = mi.traverse(phase)
    assert dr.allclose(params["values"], [0.5, 1.0, 1.5])
    # The plugin itself evaluates consistently
    ctx = mi.PhaseFunctionContext(None)
    mei = mi.MediumInteraction3f()
    mei.wi = np.array([0, 0, -1])
    wo = [0, 0, 1]
    assert dr.allclose(phase.eval_pdf(ctx, mei, wo)[0], dr.inv_two_pi * 1.5 / ref_integral)