code: def consistent(self,lab):
          
          for const in self.constraints:
              if not const.consistent(lab):
                  return False
          return True
docs: Check whether the labeling is consistent with all constraints