def find(self, name, menu=None):
menu = menu or self.menu<EOL>for i in menu:<EOL><INDENT>if i.name == name:<EOL><INDENT>return i<EOL><DEDENT>else:<EOL><INDENT>if i.childs:<EOL><INDENT>ret_item = self.find(name, menu=i.childs)<EOL>if ret_item:<EOL><INDENT>return ret_item<EOL><DEDENT><DEDENT><DEDENT><DEDENT>
Finds a menu item by name and returns it.

:param name:
    The menu item name.