def METHOD_NAME(self) -> nodes.document:
    master = self.config.root_doc
    tree = self.env.get_doctree(master)
    tree = inline_all_toctrees(self, set(), master, tree, darkgreen, [master])
    tree['docname'] = master
    self.env.resolve_references(tree, master, self)
    self.fix_refuris(tree)
    return tree