code: def driver():
      import time
  
      from selenium.webdriver.chrome.options import Options
      from selenium.webdriver.common.desired_capabilities import (
          DesiredCapabilities,
      )
      from seleniumwire import webdriver
  
      time.sleep(1)
  
      options = Options()
      d = DesiredCapabilities.CHROME
      d["goog:loggingPrefs"] = {"browser": "ALL"}
      if not TESTING_LOCAL:
          if headless:
              options.add_argument("--headless")
          # options.add_argument("--no=sandbox")
          driver = webdriver.Chrome(
              options=options,
              desired_capabilities=d,
          )
      else:
          options.add_argument("--remote-debugging-port=9222")
          driver = webdriver.Chrome(
              options=options,
              # executable_path="/home/jeroen/chromedriver",
              desired_capabilities=d,
          )
          # driver = webdriver.Firefox(executable_path='/home/jonas/git/gIDLaB/plotly-dynamic-resampling/geckodriver')
      return driver
  
imports: import os
  from typing import Union
  import numpy
  import pandas
  import plotly.graph_objects
  import pytest
  from plotly.subplots import make_subplots
  from plotly_resampler import LTTB, EveryNthPoint, FigureResampler, unregister_plotly_resampler
label_desc: Use image node_id 4 for calling a global function with example usage: driver() and returns: driver