code: def until(
      wait_cond,
      timeout,
      poll=0.1,
      msg="expected condition not met within timeout",
  ):  # noqa: C0330
      res = wait_cond()
      logger.debug(
          "start wait.until with method, timeout, poll => %s %s %s",
          wait_cond,
          timeout,
          poll,
      )
      end_time = time.time() + timeout
      while not res:
          if time.time() > end_time:
              raise TestingTimeoutError(msg)
          time.sleep(poll)
          res = wait_cond()
          logger.debug("poll => %s", time.time())
  
      return res
  
imports: import time
  import logging
  from selenium.common.exceptions import WebDriverException
  from selenium.webdriver.common.by import By
  from dash.testing.errors import TestingTimeoutError
label_desc: Use image node_id 1 for calling a global function with example usage: until(wait_cond, timeout, poll, msg) and returns: res