def distribute(node):
children = list(c for c in node.childNodes if is_element(c))<EOL>unwrap(node)<EOL>tag_name = node.tagName<EOL>for c in children:<EOL><INDENT>wrap_inner(c, tag_name)<EOL><DEDENT>
Wrap a copy of the given element around the contents of each of its
children, removing the node in the process.