code: def add_to_submenu(self, submenu_path, item):
          '''
          add an item to a submenu using a menu path array
          '''
          for m in self.items:
              if m.name == submenu_path[0]:
                  m.add_to_submenu(submenu_path[1:], item)
                  return
          raise(ValueError("No submenu (%s) found" % (submenu_path[0]))f add_to_submenu(self, submenu_path, item):
          '''
          add an item to a submenu using a menu path array
          '''
          for m in self.items:
              if m.name == submenu_path[0]:
                  m.add_to_submenu(submenu_path[1:], item)
                  return
          raise(ValueError("No submenu (%s) found" % (submenu_path[0])))
docs: add an item to a submenu using a menu path array