def parse_old_menu(menu_data):
menu_title = menu_data['<STR_LIT:title>']<EOL>menu = CursesMenu(menu_title)<EOL>for item in menu_data["<STR_LIT>"]:<EOL><INDENT>item_type = item["<STR_LIT:type>"]<EOL>item_title = item["<STR_LIT:title>"]<EOL>if item_type == menuItem.COMMAND:<EOL><INDENT>item_command = item["<STR_LIT>"]<EOL>menu.append_item(CommandItem(item_title, item_command, menu))<EOL><DEDENT>elif item_type == menuItem.FUNCTION:<EOL><INDENT>item_function = item["<STR_LIT>"]<EOL>menu.append_item(FunctionItem(item_title, item_function, menu))<EOL><DEDENT>elif item_type == menuItem.EXITMENU:<EOL><INDENT>menu.append_item(ExitItem(item_title, menu))<EOL><DEDENT>elif item_type == menuItem.NUMBER:<EOL><INDENT>menu.append_item(SelectionItem(item_title, menu))<EOL><DEDENT>elif item_type == menuItem.MENU:<EOL><INDENT>new_menu = parse_old_menu(item)<EOL>menu.append_item(SubmenuItem(item_title, menu, new_menu))<EOL><DEDENT><DEDENT>return menu<EOL>
Take an old-style menuData dictionary and return a CursesMenu

:param dict menu_data:
:return: A new CursesMenu
:rtype: CursesMenu