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: Plug the nodes in `queue' with the labels in `potential_labels'.
  
  Each element of `queue' is a tuple of the node to plug and the list of
  ancestor holes from the root of the graph to that node.
  
  `potential_labels' is a set of the labels which are still available for
  plugging.
  
  `plug_acc' is the incomplete mapping of holes to labels made on the
  current branch of the search tree so far.
  
  `record' is a list of all the complete pluggings that we have found in
  total so far.  It is the only parameter that is destructively updated.
docstr_tok: ["Plug","the","nodes","in","`","queue","'","with","the","labels","in","`","potential_labels","'",".","Each","element","of","`","queue","'","is","a","tuple","of","the","node","to","plug","and","the","list","of","ancestor","holes","from","the","root","of","the","graph","to","that","node",".","`","potential_labels","'","is","a","set","of","the","labels","which","are","still","available","for","plugging",".","`","plug_acc","'","is","the","incomplete","mapping","of","holes","to","labels","made","on","the","current","branch","of","the","search","tree","so","far",".","`","record","'","is","a","list","of","all","the","complete","pluggings","that","we","have","found","in","total","so","far",".","It","is","the","only","parameter","that","is","destructively","updated","."]
code: def _plug_nodes(self, queue, potential_labels, plug_acc, record):
      """
      Plug the nodes in `queue' with the labels in `potential_labels'.
  
      Each element of `queue' is a tuple of the node to plug and the list of
      ancestor holes from the root of the graph to that node.
  
      `potential_labels' is a set of the labels which are still available for
      plugging.
  
      `plug_acc' is the incomplete mapping of holes to labels made on the
      current branch of the search tree so far.
  
      `record' is a list of all the complete pluggings that we have found in
      total so far.  It is the only parameter that is destructively updated.
      """
      if queue != []:
          (node, ancestors) = queue[0]
          if node in self.holes:
              # The node is a hole, try to plug it.
              self._plug_hole(
                  node,
                  ancestors,
                  queue[1:],
                  potential_labels,
                  plug_acc,
                  record,
              )
          else:
              assert node in self.labels
              # The node is a label.  Replace it in the queue by the holes and
              # labels in the formula fragment named by that label.
              args = self.fragments[node][1]
              head = [(a, ancestors) for a in args if self.is_node(a)]
              self._plug_nodes(
                  head + queue[1:], potential_labels, plug_acc, record
              )
      else:
          raise Exception("queue empty")
  
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 8 for calling the HoleSemantics obj's underlying member method code with example usage: obj._plug_nodes(queue, potential_labels, plug_acc, record) without return types