def METHOD_NAME(parameters, parameter, function, sigma, reoptimize=True, **kwargs):
    if len(parameters.free_parameters) <= 1:
        reoptimize = False
    with parameters.restore_status():
        result = _confidence_scipy_brentq(
            parameters=parameters,
            parameter=parameter,
            function=function,
            sigma=sigma,
            upper=False,
            reoptimize=reoptimize,
            **kwargs,
        )
    with parameters.restore_status():
        result_errp = _confidence_scipy_brentq(
            parameters=parameters,
            parameter=parameter,
            function=function,
            sigma=sigma,
            upper=True,
            reoptimize=reoptimize,
            **kwargs,
        )
    result.update(result_errp)
    return result