code: def is_empty(self):
          
          while self.pq:
              if self.pq[0][1] != self.INVALID:
                  return False
              else:
                  _, _, element = heapq.heappop(self.pq)
                  if element in self.element_finder:
                      del self.element_finder[element]
          return True
docs: Determines if the priority queue has any elements.
          Performs removal of any elements that were "marked-as-invalid".
  
          :returns: true iff the priority queue has no elements.