<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_empty(self):
 """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. """

        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