def METHOD_NAME(data, averages, est_sigma, tail, atol):
    df = mack_r(data, averages[1], est_sigma[1], tail).rx("Mack.ParameterRisk")
    p = mack_p(data, averages[0], est_sigma[0], tail).parameter_risk_
    xp = p.get_array_module()
    p = p.values[0, 0, :, :][:, :-1] if not tail else p.values[0, 0, :, :]
    r = xp.array(df[0])
    assert xp.allclose(r, p, atol=atol)