code: def find_matching_elements(
      driver: WebDriver,
      selector: str,
      *,
      root: WebElement | None = None,
      parent: bool = False,
  ) -> list[WebElement]:
      return driver.execute_script(
          MATCHES_SCRIPT, selector, root, parent
      )
  
imports: from __future__ import annotations
  import logging
  from typing import TYPE_CHECKING, Any, Sequence
  from selenium.webdriver.common.action_chains import ActionChains
  from selenium.webdriver.common.by import By
  from selenium.webdriver.common.keys import Keys
  from bokeh.models import Button
label_desc: Use image node_id 1 for calling a global function with example usage: find_matching_elements(driver, selector) and returns: driver