def METHOD_NAME(data, outliers, kernel):
    '''Replace clipped values with the mean from a moving mean.
    Parameters
    ----------
    data : ndarray (1D, float)
        The input array in which to replace outliers
    outliers : ndarray (1D, bool)
        The input array in which to replace outliers
    kernel : astropy.convolution.Kernel1D
        The kernel used to compute the moving mean.
    Returns
    -------
    data : ndarray (boolean)
        An array with the same dimensions as the input array with outliers
        replaced with fill_value.
    Notes
    -----
    History:
    - Jan 29, 2022 Taylor Bell
        Initial version
    '''
    # First set outliers to NaN so they don't bias moving mean
    data[outliers] = np.nan
    smoothed_data = convolve(data, kernel, boundary='extend')
    # Replace outliers with value of moving mean
    data[outliers] = smoothed_data[outliers]
    return data