def METHOD_NAME(Y_array, X_array):
    """
    Computation of the RMS bunch length and position from the line
    density (bunch length = 4sigma).
    """
    timeResolution = X_array[1] - X_array[0]
    lineDenNormalized = Y_array / np.trapz(Y_array, dx=timeResolution)
    bp_rms = np.trapz(X_array * lineDenNormalized, dx=timeResolution)
    bl_rms = 4 * np.sqrt(
        np.trapz((X_array - bp_rms)**2 * lineDenNormalized, dx=timeResolution))
    return bp_rms, bl_rms