<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def traverse_layout(root, callback):
 """ Tree walker and invokes the callback as it traverse pdf object tree """

    callback(root)
    if isinstance(root, collections.Iterable):
        for child in root:
            traverse_layout(child, callback)