@staticmethod<EOL><INDENT>def compare_nodes(node1, node2, ret):<DEDENT>
for child in node2.getchildren():<EOL><INDENT>peer = ModelDiff.get_peer(child.tag, node1)<EOL>if peer is None:<EOL><INDENT>ModelDiff.copy_subtree(ret, child, '<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>if ModelDiff.node_equal(peer, child):<EOL><INDENT>continue<EOL><DEDENT>else:<EOL><INDENT>if child.attrib['<STR_LIT:type>'] in ['<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>ModelDiff.copy_node(ret, child, '<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>ret_child = ModelDiff.copy_node(ret, child, '<STR_LIT>')<EOL>ModelDiff.compare_nodes(peer, child, ret_child)<EOL><DEDENT><DEDENT><DEDENT><DEDENT>for child in node1.getchildren():<EOL><INDENT>peer = ModelDiff.get_peer(child.tag, node2)<EOL>if peer is None:<EOL><INDENT>ModelDiff.copy_subtree(ret, child, '<STR_LIT>')<EOL><DEDENT><DEDENT>
compare_nodes

        High-level api: Compare node1 and node2 and put the result in ret.

        Parameters
        ----------

        node1 : `Element`
            A node in a model tree.

        node2 : `Element`
            A node in another model tree.

        ret : `Element`
            A node in self.tree.

        Returns
        -------

        None
            Nothing returns.