class_docstr: A pairing heap.
class_docstr_tok: ["A","pairing","heap","."]
docstr: Merge the subtrees of the root using the standard two-pass method.
  The resulting subtree is detached from the root.
docstr_tok: ["Merge","the","subtrees","of","the","root","using","the","standard","two-pass","method",".","The","resulting","subtree","is","detached","from","the","root","."]
code: def _merge_children(self, root):
      """Merge the subtrees of the root using the standard two-pass method.
      The resulting subtree is detached from the root.
      """
      node = root.left
      root.left = None
      if node is not None:
          link = self._link
          # Pass 1: Merge pairs of consecutive subtrees from left to right.
          # At the end of the pass, only the prev pointers of the resulting
          # subtrees have meaningful values. The other pointers will be fixed
          # in pass 2.
          prev = None
          while True:
              next = node.next
              if next is None:
                  node.prev = prev
                  break
              next_next = next.next
              node = link(node, next)
              node.prev = prev
              prev = node
              if next_next is None:
                  break
              node = next_next
          # Pass 2: Successively merge the subtrees produced by pass 1 from
          # right to left with the rightmost one.
          prev = node.prev
          while prev is not None:
              prev_prev = prev.prev
              node = link(prev, node)
              prev = prev_prev
          # Now node can become the new root. Its has no parent nor siblings.
          node.prev = None
          node.next = None
          node.parent = None
      return node
  
imports: from heapq import heappop, heappush
  from itertools import count
  import networkx
label_desc: Use image node_id 7 for calling the PairingHeap obj's underlying member method code with example usage: obj._merge_children(root) and returns: node