code: def get_nodes(self, request):
          
          nodes = []
          docsmap_file = os.path.join(settings.SPHINX_DOCS_ROOT, 'docsmap.json')
          if not os.path.exists(docsmap_file):
              return nodes
          with io.open(docsmap_file) as fh:
              docs_map = json.load(fh, encoding='utf-8')
  
          for counter, items in enumerate(docs_map.items(), 1):
              bits = items[0].split('/')
              if len(bits) == 1 and bits[0] == 'index' or len(bits) == 2 and bits[1] != 'index':
                  continue
              node = NavigationNode(
                  title=items[1],
                  url=reverse_lazy('sphinx-documentation', args=(bits[0],)),
                  id=counter,
              )
              nodes.append(node)
          return nodes
docs: This method is used to build the menu tree.