input: Write a python function to implement a priority queue using heapq module.
  assert pq.pop() == 'A'
  assert pq.pop() == 'C'
  assert pq.pop() == 'B'
  assert pq.isEmpty() == True
output: import heapq
  
  class PriorityQueue:
      def __init__(self):
          self.queue = []
          self.entry_finder = {}
          self.REMOVED = '<removed-task>'
          self.counter = 0
  
      def push(self, task, priority=0):
          if task in self.entry_finder:
              self.remove(task)
          count = self.counter
          entry = [priority, count, task]
          self.entry_finder[task] = entry
          heapq.heappush(self.queue, entry)
          self.counter += 1
  
      def remove(self, task):
          entry = self.entry_finder.pop(task)
          entry[-1] = self.REMOVED
  
      def pop(self):
          while self.queue:
              priority, count, task = heapq.heappop(self.queue)
              if task is not self.REMOVED:
                  del self.entry_finder[task]
                  return task
          raise KeyError('pop from an empty priority queue')
  
      def isEmpty(self):
          return not any(task is not self.REMOVED for priority, count, task in self.queue)
  
  # Example usage
  pq = PriorityQueue()
  pq.push('A', 1)
  pq.push('B', 3)
  pq.push('C', 2)
  assert pq.pop() == 'A'
  assert pq.pop() == 'C'
  assert pq.pop() == 'B'
  assert pq.isEmpty() == True