def maskMODIS(image):
    """
    Mask snow covered and extremely high albedo areas from the modis images.

    Parameters
    ----------
    image : image.Image
        MODIS image.

    Returns
    -------
    image.image
        Masked MODIS image.

    """
    # calculate snow water index for the image
    swi = image.expression(
        '(green * (nir - swir1)) / ((green + nir) * (nir + swir1))',
        {'green': image.select(['green']),
         'nir': image.select(['nir']),
         'swir1': image.select(['swir1'])
         }).rename('swi')

    # mask out values of swi above 0.1
    mask = swi.lt(0.1)

    return image \
        .updateMask(mask) \
        .copyProperties(image, ['system:time_start', 'system:id'])