Human: how do I sort a python list of dictionaries given a list of ids with the desired order? Assistant: 
Here is some code to sort list `users` using values associated with key 'id' according to elements in list `order`

users.sort(key=lambda x: order.index(x['id']))

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.