human
How to perform double sort inside an array?
assistant
Here is some code to sort list `bar` by each element's attribute `attrb1` and attribute `attrb2` in reverse order

bar.sort(key=lambda x: (x.attrb1, x.attrb2), reverse=True)

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