intent: how do I sort a python list of dictionaries given a list of ids with the desired order?
rewritten_intent: sort a python list of dictionaries `users` by a given list `order` of ids 'id' with the desired order
snippet: users.sort(key=lambda x: order.index(x['id']))