Describe how you would approach a live coding system design problem, including how you would structure the solution, choose data structures, and ensure correctness.
Implement the core queue component as process_operations(operations). Each operation is ['add', task_id, priority], ['cancel', task_id], or ['pop']; return the task IDs produced by pop operations, using None when the queue is empty. Lower priority values are dequeued first, and equal priorities use insertion order.
def process_operations(operations):