1) Corrected the way the initial two nodes are assembled. Zip function
is not used anymore.

zip(n1, n2)[0] used to give the nodes' children instead of the node
itself. So instead use q.put((n1, n2))

2) When sorting the children of a node, correctly use the node.tag
instead of its object reference

so now, it becomes - nodeX_children.sort(key=lambda node:node.tag)

3) used camelCasing for the function names