Design a small in-memory user directory for an Air Apps mobile application. Implement CRUD-style operations while ensuring user IDs remain unique and listing users preserves their insertion order.
Implement process_user_operations(operations). Each operation is a dictionary with an action field:
{"action": "add", "user": {"id": string, "name": string, "email": string}}: Add a user and return true. If the ID already exists, return false.{"action": "update", "user": {"id": string, "name": string, "email": string}}: Replace an existing user record and return true. If the ID does not exist, return false.{"action": "remove", "id": string}: Remove a user and return true if one existed, otherwise false.{"action": "get", "id": string}: Return the user dictionary, or null if absent.{"action": "list"}: Return all users in insertion order.Return an array containing one result for every operation. Use a class internally to encapsulate the directory state.
def process_user_operations(operations):