<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _compute_fval(X, A, R, P, Z, lmbdaA, lmbdaR, lmbdaZ, normX):
 """Compute fit for full slices"""

    f = lmbdaA * norm(A) ** 2
    for i in range(len(X)):
        ARAt = dot(A, dot(R[i], A.T))
        f += (norm(X[i] - ARAt) ** 2) / normX[i] + lmbdaR * norm(R[i]) ** 2
    return f