human
Sorting dictionary keys based on their values
assistant
Here is some code to sort keys of dictionary 'd' based on their values

sorted(d, key=lambda k: d[k][1])

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