<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(x1, x2=-1):
 """ Root-mean-square error - this function accepts two series of data or directly one series with error. **Args:** * `x1` - first data series or error (1d array) **Kwargs:** * `x2` - second series (1d array) if first series was not error directly,\\ then this should be the second series **Returns:** * `e` - RMSE of error (float) obtained directly from `x1`, \\ or as a difference of `x1` and `x2` """

    e = get_valid_error(x1, x2)
    return np.sqrt(np.dot(e, e) / float(len(e)))