Tell me about how you would design an order book that matches incoming buy and sell orders and outputs all matched <buy,sell> transaction pairs.
Implement process_orders(orders). Each order is a dictionary with id, side ("BUY" or "SELL"), price, and positive quantity. Process orders in input order using price-time priority: highest-priced buys and lowest-priced sells match first, with FIFO ordering at the same price. Return a list of [buy_id, sell_id, quantity] transactions in matching order. Unfilled quantities remain in the book.
def process_orders(orders):