class_docstr: This class holds the broken-down components of a hole semantics, i.e. it
  extracts the holes, labels, logic formula fragments and constraints out of
  a big conjunction of such as produced by the hole semantics grammar.  It
  then provides some operations on the semantics dealing with holes, labels
  and finding legal ways to plug holes with labels.
class_docstr_tok: ["This","class","holds","the","broken-down","components","of","a","hole","semantics",",","i.e",".","it","extracts","the","holes",",","labels",",","logic","formula","fragments","and","constraints","out","of","a","big","conjunction","of","such","as","produced","by","the","hole","semantics","grammar",".","It","then","provides","some","operations","on","the","semantics","dealing","with","holes",",","labels","and","finding","legal","ways","to","plug","holes","with","labels","."]
docstr: Return True if the `label' cannot be placed underneath the holes given
  by the set `ancestors' because it would violate the constraints imposed
  on it.
docstr_tok: ["Return","True","if","the","`","label","'","can","not","be","placed","underneath","the","holes","given","by","the","set","`","ancestors","'","because","it","would","violate","the","constraints","imposed","on","it","."]
code: def _violates_constraints(self, label, ancestors):
      """
      Return True if the `label' cannot be placed underneath the holes given
      by the set `ancestors' because it would violate the constraints imposed
      on it.
      """
      for c in self.constraints:
          if c.lhs == label:
              if c.rhs not in ancestors:
                  return True
      return False
  
imports: from functools import reduce
  from nltk.parse import load_parser
  from nltk.sem.logic import AllExpression, AndExpression, ApplicationExpression, ExistsExpression, IffExpression, ImpExpression, LambdaExpression, NegatedExpression, OrExpression
  from nltk.sem.skolemize import skolemize
label_desc: Use image node_id 10 for calling the HoleSemantics obj's underlying member method code with example usage: obj._violates_constraints(label, ancestors) and returns: False, True