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: Extract holes, labels, formula fragments and constraints from the hole
  semantics underspecified representation (USR).
docstr_tok: ["Extract","holes",",","labels",",","formula","fragments","and","constraints","from","the","hole","semantics","underspecified","representation","(","USR",")","."]
code: def _break_down(self, usr):
      """
      Extract holes, labels, formula fragments and constraints from the hole
      semantics underspecified representation (USR).
      """
      if isinstance(usr, AndExpression):
          self._break_down(usr.first)
          self._break_down(usr.second)
      elif isinstance(usr, ApplicationExpression):
          func, args = usr.uncurry()
          if func.variable.name == Constants.LEQ:
              self.constraints.add(Constraint(args[0], args[1]))
          elif func.variable.name == Constants.HOLE:
              self.holes.add(args[0])
          elif func.variable.name == Constants.LABEL:
              self.labels.add(args[0])
          else:
              label = args[0]
              assert label not in self.fragments
              self.fragments[label] = (func, args[1:])
      else:
          raise ValueError(usr.label())
  
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 3 for calling the HoleSemantics obj's underlying member method code with example usage: obj._break_down(usr) without return types