<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def gaussfill(dem, size=3, newmask=None):
 """Gaussian filter with filling """

    smooth = gauss_fltr_astropy(dem, size=size)
    smooth[~dem.mask] = dem[~dem.mask]
    if newmask is not None:
        smooth = np.ma.array(smooth, mask=newmask)
    return smooth