'Return a TOC nodetree -- for use on the same page only!'

def get_toc_for(self, docname):

    toc = self.tocs[docname].deepcopy()
    for node in toc.traverse(nodes.reference):
        node['refuri'] = node['anchorname']
    return toc
