@async
    @require_browser
    def run(self):
        with loading("Creating DOM tree."):
            dom_tree = browser.execute(get_dom_tree_js)

        def build_subtree(tree, path=[], depth=0, curr=[]):
            result = []

            node = path.pop(0) if path else None

            for i, t in enumerate(tree):
                result.append(("  " * depth + t['tag'],
                               t['xpath'], curr + [i]))

                if i == node or len(tree) == 1:
                    result.extend(build_subtree(t['children'], path,
                                                depth + 1, curr + [i]))

            return result

        @async
        def select(i):
            if 0 < i:
                return

            tag, xpath, path = self.items[i]
            self.items = build_subtree(dom_tree, path)

            self.window.show_quick_panel([x for x, y, z in self.items],
                                         select, 0, i, self.highlight)

        self.items = build_subtree(dom_tree)
        self.window.show_quick_panel([x for x, y, z in self.items],
                                     select, 0, 0, self.highlight)
dataset/ETHPy150Open apiad/sublime-browser-integration/browser_integration_selectint.py/BrowserIntegrationSelectintCommand.run/swapped operands of `<`