def f_hess(v, Obj, D, eta, C_ridge=1.0):
    """Compute the hessian-vector product for Obj."""
    W = v.reshape(D.shape)
    hess_v = Obj.hess_v(W)
    if eta > 0:
        hess_v += W / eta

    if C_ridge > 0:
        hess_v += C_ridge * W

    return hess_v.reshape(-1)