'Shutdown menu; occurs when reaching the end node or using the quit command.'

def close_menu(self):

    self.caller.cmdset.remove(EvMenuCmdSet)
    del self.caller.ndb._menutree
    if self._persistent:
        self.caller.attributes.remove('_menutree_saved')
        self.caller.attributes.remove('_menutree_saved_startnode')
    if (self.cmd_on_exit is not None):
        self.cmd_on_exit(self.caller, self)
