code: def hasconstraint(self):
          
          constrained = False
          for term in self._terms:
              constrained = constrained or term.hasconstraint
          return constrained
docs: bool, whether the term has any constraints