def METHOD_NAME(benchmark, n, log, numba):
    x = make_data(size=n)
    if log:
        def cost(x, z, mu, sigma, slope):
            return -np.sum(log_mixture(x, z, mu, sigma, slope))
    else:
        def cost(x, z, mu, sigma, slope):
            return -np.sum(np.log(mixture(x, z, mu, sigma, slope)))
    if numba:
        cost = nb.njit(cost)
        cost(x, *ARGS)  # jit warm-up
    m = Minuit(lambda *args: cost(x, *args), *ARGS)
    m.errordef = Minuit.LIKELIHOOD
    m.limits[0, 1] = (0, 1)
    m.limits[2, 3] = (0, 10)
    def run():
        m.reset()
        return m.migrad()
    m = benchmark(run)
    assert m.valid
    # ignore slope
    assert_allclose(m.values[:-1], ARGS[:-1], atol=2 / n**0.5)