code: def _expiration_generator(
              timeout_generator: Iterable[float],
              now: Callable[[], float] = time.time,
      ) -> Iterator[bool]:
          
          for timeout in timeout_generator:
              _next = now() + timeout  # next value is now + next generated timeout
              yield True
              while now() < _next:  # yield False while next is still in the future
                  yield False
docs: Stateful generator that yields True if more than timeout has passed since previous True,
          False otherwise.
  
          Helper method to tell when a message needs to be retried (more than timeout seconds
          passed since last time it was sent).
          timeout is iteratively fetched from timeout_generator
          First value is True to always send message at least once