def process_autosummary_toc(app, doctree):
env = app.builder.env<EOL>crawled = {}<EOL>def crawl_toc(node, depth=<NUM_LIT:1>):<EOL><INDENT>crawled[node] = True<EOL>for j, subnode in enumerate(node):<EOL><INDENT>try:<EOL><INDENT>if (isinstance(subnode, autosummary_toc)<EOL>and isinstance(subnode[<NUM_LIT:0>], addnodes.toctree)):<EOL><INDENT>env.note_toctree(env.docname, subnode[<NUM_LIT:0>])<EOL>continue<EOL><DEDENT><DEDENT>except IndexError:<EOL><INDENT>continue<EOL><DEDENT>if not isinstance(subnode, nodes.section):<EOL><INDENT>continue<EOL><DEDENT>if subnode not in crawled:<EOL><INDENT>crawl_toc(subnode, depth+<NUM_LIT:1>)<EOL><DEDENT><DEDENT><DEDENT>crawl_toc(doctree)<EOL>
Insert items described in autosummary:: to the TOC tree, but do
    not generate the toctree:: list.