Moving window integration. N is the number of samples in the width of the integration
    window

    ----------
    Parameters
    ----------
    data : ndarray
        Samples of the signal where a moving window integration will be applied.
    sample_rate : int
        Sampling rate at which the acquisition took place.

    Returns
    -------
    out : ndarray
        Integrated signal samples.

def _integration(data, sample_rate):
    """
    Moving window integration. N is the number of samples in the width of the integration
    window

    ----------
    Parameters
    ----------
    data : ndarray
        Samples of the signal where a moving window integration will be applied.
    sample_rate : int
        Sampling rate at which the acquisition took place.

    Returns
    -------
    out : ndarray
        Integrated signal samples.
    """
    wind_size = int(0.080 * sample_rate)
    int_ecg = numpy.zeros_like(data)
    cum_sum = data.cumsum()
    int_ecg[wind_size:] = (cum_sum[wind_size:] - cum_sum[:-wind_size]) / wind_size
    int_ecg[:wind_size] = cum_sum[:wind_size] / numpy.arange(1, wind_size + 1)

    return int_ecg