def mt_loss(theta, R, beta):
    """Compute objective function for multi task group lasso."""
    n_samples = len(R)
    obj = 0.
    for n in range(n_samples):
        obj += R[n] ** 2
    obj *= 0.5

    return obj