def get_mean_error(x1, x2=-1, function="MSE"):
    """
    This function returns desired mean error. Options are: MSE, MAE, RMSE
    
    **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` - mean error value (float) obtained directly from `x1`, \\
        or as a difference of `x1` and `x2`
    """
    if function == "MSE":
        return MSE(x1, x2)
    elif function == "MAE":
        return MAE(x1, x2)
    elif function == "RMSE":
        return RMSE(x1, x2)
    else:
        raise ValueError('The provided error function is not known')