code: def PopTask(self):
      
      try:
        _, task = heapq.heappop(self._heap)
  
      except IndexError:
        return None
      self._task_identifiers.remove(task.identifier)
      return task
docs: Retrieves and removes the first task from the heap.
  
      Returns:
        Task: the task or None if the heap is empty.