def create_boards_menu(arduino_info):
    sub_menus = []
    for root_dir in arduino_info.get_root_dirs():
        for package in root_dir.get_packages():
            for platform in package.get_platforms():
                menu_dict = {}
                menu_dict['caption'] = platform.get_caption()
                menu_dict['command'] = 'none_command'
                menu = Menu(menu_dict)
                sub_menus.append(menu)
                boards = platform.get_boards()
                for board in boards:
                    menu_dict = {}
                    caption = board.get_caption()
                    board_group = board.get_params().get('group', '')
                    if board_group:
                        caption = '[%s] %s' % (board_group, caption)
                    menu_dict['caption'] = caption
                    menu_dict['command'] = 'select_board'
                    menu_dict['args'] = {'board_id': board.get_id()}
                    menu_dict['checkbox'] = True
                    menu = Menu(menu_dict)
                    sub_menus.append(menu)
                sub_menus.append(Menu())
    write_menu('boards', sub_menus)
dataset/ETHPy150Open Robot-Will/Stino/stino/st_menu.py/create_boards_menu/original