public List<ExpiredTimeout<T, U>> poll() {
        List<ExpiredTimeout<T, U>> results = new ArrayList<>();

        ScheduledTimeout<T, U> timeout = timeoutQueue.peek();
        while (timeout != null && timeout.deadlineMs <= time.milliseconds()) {
            timeoutQueue.poll();
            timeoutMap.remove(timeout.key, timeout);

            results.add(new ExpiredTimeout<>(
                timeout.key,
                timeout.operation.generateRecords()
            ));

            timeout = timeoutQueue.peek();
        }

        return results;
    }
@return A list of expired timeouts based on the current time.
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/MockCoordinatorTimer.java