This method is used to build the menu tree.

def get_nodes(self, request):
        """
        This method is used to build the menu tree.
        """
        nodes = []
        for term in Term.objects.only('pk', 'name', 'url'):
            try:
                url = term.get_absolute_url()
            except NoReverseMatch:
                continue

            nodes.append(NavigationNode(
                smart_text(term),
                url,
                term.pk,
            ))
        return nodes