code: def perform_hover_action(self, locator, func, error_msg='', exceptions=None, params=None,
                               alt_loc=None, alt_params=None, **kwargs):
          
          def _do_hover():
              try:
                  with self.hover(locator, params, alt_loc, alt_params):
                      return func(**kwargs)
              except exc:
                  return False
  
          exc = [StaleElementReferenceException]
          if exceptions is not None:
              try:
                  exc.extend(iter(exceptions))
              except TypeError:  # exceptions is not iterable
                  exc.append(exceptions)
          exc = tuple(exc)
  
          msg = error_msg or "Performing hover actions failed!"
          return ActionWait().until(_do_hover, msg)
docs: Hovers an element and performs whatever action is specified in the supplied function.
  
          NOTE: Specified function MUST return a non-false value upon success!
  
          :param locator: locator tuple or WebElement instance
          :param func: action to perform while hovering
          :param error_msg: error message to display if hovering failed
          :param exceptions: list of exceptions (default: StaleElementReferenceException)
          :param params: (optional) locator parameters
          :param alt_loc: alternate locator tuple or WebElement instance to move to with offset
          :param alt_params: (optional) alternate locator parameters
          :param kwargs: keyword arguments to the function func
          :return: result of performed action