code: def get_graph_points(browser, graph_id, expected_len):
      until(
          lambda: len(browser.find_elements(f"{graph_id} .points path"))
          == expected_len,
          5,
      )
  
      traces = browser.find_elements(f"{graph_id} .points")
  
      for trace in traces:
          elements = trace.find_elements(By.CSS_SELECTOR, "path")
          for element in elements:
              ActionChains(browser.driver).move_to_element(
                  element
              ).perform()
              hover = browser.find_element(f"{graph_id} .hoverlayer")
              content = hover.text
              if not content.startswith("("):
                  continue  # Ignore the extra trace tooltip
  
              x, y = content[1:-1].split(", ")
  
              yield float(x), float(y)
  
imports: import pytest
  import time
  import json
  import werkzeug
  from selenium.webdriver import ActionChains
  from dash import Dash, Input, Output, State, dcc, html
  from dash.exceptions import PreventUpdate
  from dash.testing.wait import until
  from selenium.webdriver.common.by import By
  from selenium.webdriver.support.ui import WebDriverWait
  from selenium.webdriver.support import expected_conditions
label_desc: Use image node_id 4 for calling a global function with example usage: get_graph_points(browser, graph_id, expected_len) without return types