<human>:  How to sort a list of objects , based on an attribute of the objects?
<bot>: Here is some code to sort a list of objects `ut`, based on a function `cmpfun` in descending order

ut.sort(key=cmpfun, reverse=True)

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