Get the mask for the three-way overlaps matrix O, which is 0 when
        indices i,j,k are not unique

def get_mask(self, m):
        """Get the mask for the three-way overlaps matrix O, which is 0 when
        indices i,j,k are not unique"""
        mask = torch.ones((m, m, m, self.k_lf, self.k_lf, self.k_lf)).byte()
        for i, j, k in product(range(m), repeat=3):
            if len(set((i, j, k))) < 3:
                mask[i, j, k, :, :, :] = 0
        return mask