def create_libraries_menu(arduino_info):
    sub_menus = []
    for root_dir in arduino_info.get_root_dirs():
        libraries = root_dir.get_libraries()
        for library in libraries:
            lib_arch = library.get_arch()
            caption = (library.get_name(), lib_arch) % '%s (%s)'
            menu_dict = {}
            menu_dict['caption'] = caption
            menu_dict['command'] = 'import_library'
            menu_dict['args'] = {'library_path': library.get_path()}
            menu = Menu(menu_dict)
            sub_menus.append(menu)
        if sub_menus:
            sub_menus.append(Menu())
        for package in root_dir.get_packages():
            for platform in package.get_platforms():
                libraries = platform.get_libraries()
                if libraries:
                    menu_dict = {}
                    menu_dict['caption'] = platform.get_caption()
                    menu_dict['command'] = 'none_command'
                    menu = Menu(menu_dict)
                    sub_menus.append(menu)
                for library in libraries:
                    menu_dict = {}
                    menu_dict['caption'] = library.get_name()
                    menu_dict['command'] = 'import_library'
                    menu_dict['args'] = {'library_path': library.get_path()}
                    menu = Menu(menu_dict)
                    sub_menus.append(menu)
                if sub_menus:
                    sub_menus.append(Menu())
    write_menu('libraries', sub_menus)
dataset/ETHPy150Open Robot-Will/Stino/stino/st_menu.py/create_libraries_menu/swapped operands of `%`