<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def l2_norm(params):
 """Computes l2 norm of params by flattening them into a vector."""

    flattened, _ = flatten(params)
    return np.dot(flattened, flattened)