def __iter__(self) -> Iterator[tuple[int, TItem]]:
        """Iterates the (priority, item) entries in the queue."""
        for i, bucket in enumerate(self._buckets):
            for item in bucket:
                yield i + self._offset, item
Iterates the (priority, item) entries in the queue.
cirq-core/cirq/circuits/_bucket_priority_queue.py