<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def rmse_2pi(x, xhat):
    ''' Calcualte rmse between vector or matrix x and xhat, ignoring mod of 2pi.'''
    real_diff = from_0_to_pi(x - xhat)
    np.square(real_diff, out=real_diff)
    sum_ = np.sum(real_diff)
    return sqrt(sum_ / len(x))