def top_menu_is_active(self, widget):
        """Return True if the top menu of widget is active.

        widget (either a menu.submenu.main.Menu or
                menu.command.Command instance)
        """
        ### return whether the top menu of the widget is
        ### the active menu
        return self.get_top_menu(widget) is self.active_menu
Return True if the top menu of widget is active.

        widget (either a menu.submenu.main.Menu or
                menu.command.Command instance)
        
nodezator/menu/behaviour.py