def find(self, name, menu=None):
        """
        Finds a menu item by name and returns it.

        :param name:
            The menu item name.
        """
        menu = menu or self.menu
        for i in menu:
            if i.name == name:
                return i
            else:
                if i.childs:
                    ret_item = self.find(name, menu=i.childs)
                    if ret_item:
                        return ret_item

        Finds a menu item by name and returns it.

        :param name:
            The menu item name.
        
flask_appbuilder/menu.py