code: def get_events_el(driver: WebDriver, model: Plot) -> WebElement:
      script = (
          FIND_VIEW_SCRIPT
          + """
      const id = arguments[0]
      function* fn(view) {
          yield view.canvas_view.events_el
      }
      return head(find(Bokeh.index, id, fn)) ?? null
      """
      )
      el = driver.execute_script(script, model.id)
      if el is not None:
          return el
      else:
          raise RuntimeError(f"can't resolve a view for {model}")
  
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 3 for calling a global function with example usage: get_events_el(driver, model) and returns: el