code: def add_constraint(self, func, variables, default_values=None):
          
          self._constraints.append((func, variables, default_values or ()))
docs: Adds a constraint that applies to one or more variables.
  
          The function must return true or false to indicate which combinations
          of variable values are valid.