def optimize_layout_handler(rule, handler):
def runner(walk, dispatcher, node):<EOL><INDENT>yield LayoutChunk(rule, handler, node)<EOL><DEDENT>return runner<EOL>
Produce an "optimized" version of handler for the dispatcher to
limit reference lookups.