code: def _calc_mask(self):
      
      mask = []
      for row in self._constraints:
        mask.append(tuple(x is None for x in row))
      return tuple(mask)
docs: Computes a boolean mask from the user defined constraints.