def METHOD_NAME(x, window_len, window='hanning'):
    """
    Smooth the data using a window with requested size.
    This method is based on the convolution of a scaled window with the signal.
    The signal is prepared by introducing reflected copies (central symmetry) of the signal
    (with the window size) in both ends so that transient parts are minimized
    in the beginning and end part of the output signal.
    Modified from: https://scipy-cookbook.readthedocs.io/items/SignalSmooth.html
    :param: x: the input signal
    :param: window_len: the dimension of the smoothing window; should be an odd integer
    :param: window: the type of window from 'flat', 'hanning', 'hamming', 'bartlett', 'blackman'\
        flat window will produce a moving average smoothing.
    :return: the smoothed signal
    example:
    t=linspace(-2,2,0.1)
    x=sin(t)+randn(len(t))*0.1
    y=smooth(x)
    see also:
    numpy.hanning, numpy.hamming, numpy.bartlett, numpy.blackman, numpy.convolve
    scipy.signal.lfilter
    """
    if x.ndim != 1:
        raise ValueError("Smooth only accepts 1 dimension arrays.")
    if x.size < window_len:
        window_len = x.size
        logger.warning("Input vector is smaller than window size. Forcing window_len = x.size")
    if window_len < 3:
        logger.warning("Window length needs to be >= 3. Returning input signal.")
        return x
    if window not in ['flat', 'hanning', 'hamming', 'bartlett', 'blackman']:
        raise ValueError("Window should be one of 'flat', 'hanning', 'hamming', 'bartlett', 'blackman'")
    # Pad signal using central symmetry
    s = np.r_[2 * x[0] - x[window_len - 1:0:-1], x, 2 * x[-1] - x[-2:-window_len - 1:-1]]
    # print(len(s))
    if window == 'flat':  # moving average
        w = np.ones(window_len, 'd')
    else:
        w = eval('np.' + window + '(window_len)')
    y = np.convolve(w / w.sum(), s, mode='valid')
    return y[int(np.ceil(window_len/2-1)):-int(np.floor(window_len/2))]