human
Sort a list in python based on another sorted list
assistant
Here is some code to sort a list `unsorted_list` based on another sorted list `presorted_list`

sorted(unsorted_list, key=presorted_list.index)

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