Implement run_producer_consumer(capacity, producer_items, num_consumers) that coordinates concurrent producers and consumers through a shared bounded buffer.
Parameters:
Run all producers and all consumers concurrently. A producer that finds the buffer full must wait until space is available; a consumer that finds the buffer empty must wait until an item is available. The function must terminate cleanly once every produced item has been consumed.
Return the list of all consumed items sorted in ascending order. (Sorting is used so the result is deterministic regardless of thread scheduling.)
Constraints: