'Return the global TOC nodetree.'

def get_toctree_for(self, docname, builder, collapse):

    doctree = self.get_doctree(self.config.master_doc)
    for toctreenode in doctree.traverse(addnodes.toctree):
        result = self.resolve_toctree(docname, builder, toctreenode, prune=True, collapse=collapse)
        if (result is not None):
            return result
