#NEWLINE# def sort_choices( self , qs , choices ) : #NEWLINE# #INDENT# '\n        Sorts the choices by applying order_by_count if applicable.\n\n        See also sort_choices_custom.\n        ' #NEWLINE# if qs . order_by_count : #NEWLINE# #INDENT# choices . sort ( key = operator . attrgetter ( 'count' ) , reverse = True ) #NEWLINE# #UNINDENT# return choices