docstr: Abstract generic pattern for explicit WebDriverWait.
code: def _wait_for(self, method, timeout, msg):
      """Abstract generic pattern for explicit WebDriverWait."""
      try:
          _wait = (
              self._wd_wait
              if timeout is None
              else WebDriverWait(self.driver, timeout)
          )
          logger.debug(
              "method, timeout, poll => %s %s %s",
              method,
              _wait._timeout,  # pylint: disable=protected-access
              _wait._poll,  # pylint: disable=protected-access
          )
  
          return _wait.until(method)
      except Exception as err:
          if callable(msg):
              message = msg(self.driver)
          else:
              message = msg
          raise TimeoutException(message) from err
  
imports: import os
  import sys
  import time
  import logging
  import warnings
  import percy
  import requests
  from selenium import webdriver
  from selenium.webdriver.support import expected_conditions
  from selenium.webdriver.common.by import By
  from selenium.webdriver.support.wait import WebDriverWait
  from selenium.webdriver.common.keys import Keys
  from selenium.webdriver.common.action_chains import ActionChains
  from selenium.common.exceptions import WebDriverException, TimeoutException, MoveTargetOutOfBoundsException
  from dash.testing.wait import text_to_equal, style_to_equal, class_to_equal, contains_text, contains_class, until
  from dash.testing.dash_page import DashPageMixin
  from dash.testing.errors import DashAppLoadingError, BrowserError, TestingTimeoutError
  from dash.testing.consts import SELENIUM_GRID_DEFAULT
label_desc: Use image node_id 10 for calling the Browser obj's underlying member method code with example usage: obj._wait_for(method, timeout, msg) and returns: _wait