def METHOD_NAME() -> None:
  """Dequeue data from a queue and invoke blocking call."""
  while not self._should_stop.is_set():
    try:
      element = self._data.get(timeout=self._interruptible_interval_secs)
      # Execute fn upon dequeuing an element from the data queue.
      fn(element)
    except queue.Empty:
      # If queue is Empty for longer than the specified time interval,
      # check again if should_stop has been requested and retry.
      continue
    except Exception as e:
      logging.error("AsyncExecuter thread terminated with error.")
      logging.exception(e)
      self._errors.put(e)
      self._should_stop.set()
      raise  # Never caught by anything, just terminates the thread.