def createLibraryImportMenu(self):
        """
        Creates the import library menu
        this method search in the user and core libraries
        """
        library_paths = Paths.getLibraryFolders()
        added_lib = []
        children = []

        # get preset
        menu_import_lib = self.getTemplateMenu(file_name='import_library.json')

        for library_dir in library_paths:
            # add separator
            if 'arduinoteensy' not in library_dir:
                temp_info = {}
                temp_info['caption'] = '-'
                children.append(temp_info)
            sub_path = glob.glob(library_dir)

            # search in sub path
            for library in sub_path:

                # Add core libraries
                if '__cores__' in library:
                    core_subs = os.path.join(library, '*')
                    core_subs = glob.glob(core_subs)
                    for core_sub in core_subs:
                        core_sub_subs = os.path.join(core_sub, '*')
                        core_sub_subs = glob.glob(core_sub_subs)
                        for core_lib in core_sub_subs:
                            caption = os.path.basename(core_lib)
                            if added_lib not in caption:
                                temp_info = {}
                                temp_info['caption'] = caption
                                temp_info['command'] = 'add_library'
                                temp_info['args'] = {'library_path': library}
                                children.append(temp_info)
                                added_lib.append(caption)

                # the rest of the libraries
                caption = os.path.basename(library)

                # get library name from json file
                pio_libs = os.path.join('platformio', 'lib')
                if pio_libs in library:

                    # get library json details
                    library_json = os.path.join(library, 'library.json')
                    if (not os.path.exists(library_json)):
                        library_json = os.path.join(
                            library, 'library.properties')

                    # when there´s json content, read it
                    json = JSONFile(library_json)
                    json = json.getData()
                    if (json != {}):
                        caption = json['name']

                if caption not in added_lib and '__cores__' not in caption:
                    temp_info = {}
                    temp_info['caption'] = caption
                    temp_info['command'] = 'add_library'
                    temp_info['args'] = {'library_path': library}
                    children.append(temp_info)
                    added_lib.append(caption)

        # save file
        menu_import_lib[0]['children'][0]['children'] = children
        self.saveSublimeMenu(data=menu_import_lib,
                             sub_folder='import_library',
                             user_path=True)
dataset/ETHPy150Open gepd/Deviot/libs/Menu.py/Menu.createLibraryImportMenu/swapped operands of `not in`