def is_shown(self, request):
        """
        If there aren't any visible items in the submenu, don't bother to show
        this menu item
        """
        for menuitem in self.menu._registered_menu_items:
            if menuitem.is_shown(request):
                return True
        return False
def is_shown ( self , request ) : for menuitem in self . menu . _registered_menu_items : if menuitem . is_shown ( request ) : return True return False
If there aren't any visible items in the submenu, don't bother to show
        this menu item