def traverse_layout(root, callback):
callback(root)<EOL>if isinstance(root, collections.Iterable):<EOL><INDENT>for child in root:<EOL><INDENT>traverse_layout(child, callback)<EOL><DEDENT><DEDENT>
Tree walker and invokes the callback as it
traverse pdf object tree