def __init__(self, items=[]):
    """
        Create a new PriorityQueueSet.
        Arguments:
            items (list): An initial item list - it can be unsorted and
                non-unique. The data structure will be created in O(N).
        """
self.set = dict((item, True) for item in items)
self.heap = list(self.set.keys())
heapq.heapify(self.heap)

def has_item(self, item):
    pass
A generic priority queue for Python