def traverse_frozen_data(data_structure):
parent_stack = [data_structure]<EOL>while parent_stack:<EOL><INDENT>node = parent_stack.pop(<NUM_LIT:0>)<EOL>tlen = -<NUM_LIT:1><EOL>if not isinstance(node, _string_types):<EOL><INDENT>try:<EOL><INDENT>tlen = len(node)<EOL><DEDENT>except:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>if tlen == -<NUM_LIT:1>:<EOL><INDENT>yield node<EOL><DEDENT>else:<EOL><INDENT>parent_stack = list(node) + parent_stack<EOL><DEDENT><DEDENT>
Yields the leaves of the frozen data-structure pre-order.

    It will produce the same order as one would write the data-structure.