<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_mask(self, hdu=None, header=None, shape=None):
 """Create a 2-d mask. Parameters hdu : `astropy.io.fits.ImageHDU` FITS image HDU header : `~astropy.io.fits.Header` FITS header shape : tuple Image shape Returns ------- mask : `numpy.array` Boolean mask Examples -------- get_mask(hdu=f[0]) get_mask(shape=(10,10)) get_mask(header=f[0].header, shape=(10,10)) """


        if hdu and header is None:
            header = hdu.header
        if hdu and shape is None:
            shape = hdu.data.shape

        region_filter = self.get_filter(header=header)
        mask = region_filter.mask(shape)

        return mask