def METHOD_NAME(beta, objF_instance, X, y, n, l2_unused):
    beta_ = make2d(beta)
    if beta_.shape[1] != 1 and beta_.shape[0] == 1:
        beta_ = beta_.T
    res = objF_instance.compute(X, y, beta_)
    v = res.valueIdx[0, 0]
    v *= n
    return v