docs: def add_menu(self, name):
          """Add a top-level menu.
  
          The menu manager only allows one menu of the same name. However, it does
          not make sure that there are no pre-existing menus of that name.
          """
          if name in self._menus:
              raise exceptions.MenuAlreadyExists("Menu name {!r} already exists.".format(name))
          menu = self._menu.addMenu(name)
          self._menus[name] = menu