human
I am working on the file "01 data structures and algorithms/01.05 implement a priority queue.ipynb".
The first task is:
下面是它的使用方式：
Can you write Python program for it?
assistant
#Here is the Python program you requested.

class Item():
    def __init__(self, name):
        self.name = name
        
    def __repr__(self):
        return 'Item({!r})'.format(self.name)

q = PriorityQuene()
q.push(Item("foo"), 1)
q.push(Item("bar"), 5)
q.push(Item("spam"), 4)
q.push(Item("grok"), 1)

q.pop()

q.pop()

q.pop()

q.pop()