def traverse(self, node):
old_level = self.current_level<EOL>if isinstance(node, nodes.section):<EOL><INDENT>if '<STR_LIT>' in node:<EOL><INDENT>self.current_level = node['<STR_LIT>']<EOL><DEDENT><DEDENT>to_visit = []<EOL>to_replace = []<EOL>for c in node.children[:]:<EOL><INDENT>newnode = self.find_replace(c)<EOL>if newnode is not None:<EOL><INDENT>to_replace.append((c, newnode))<EOL><DEDENT>else:<EOL><INDENT>to_visit.append(c)<EOL><DEDENT><DEDENT>for oldnode, newnodes in to_replace:<EOL><INDENT>node.replace(oldnode, newnodes)<EOL><DEDENT>for child in to_visit:<EOL><INDENT>self.traverse(child)<EOL><DEDENT>self.current_level = old_level<EOL>
Traverse the document tree rooted at node.

        node : docutil node
            current root node to traverse