def __init__(
        self, entries: Iterable[tuple[int, TItem]] = (), *, drop_duplicate_entries: bool = False
    ):
        """Initializes a new priority queue.

        Args:
            entries: Initial contents of the priority queue.
            drop_duplicate_entries: If set, the priority queue will ignore
                operations that enqueue a (priority, item) pair that is already
                in the priority queue. Note that duplicates of an item may still
                be enqueued, as long as they have different priorities.
        """
        self._buckets: list[list[TItem]] = []
        self._offset = 0
        self._len = 0
        self._drop_set: set[tuple[int, TItem]] | None = set() if drop_duplicate_entries else None

        for p, e in entries:
            self.enqueue(p, e)
Initializes a new priority queue.

        Args:
            entries: Initial contents of the priority queue.
            drop_duplicate_entries: If set, the priority queue will ignore
                operations that enqueue a (priority, item) pair that is already
                in the priority queue. Note that duplicates of an item may still
                be enqueued, as long as they have different priorities.
        
cirq-core/cirq/circuits/_bucket_priority_queue.py