python: sort an array of dictionaries with custom comparator?,"key = lambda d: (d['rank'] == 0, d['rank'])"