def words_with_votes(self, only_topics=True):
result = Word.objects.filter(<EOL>bingofield__board__game__id=self.id).exclude(<EOL>type=WORD_TYPE_MIDDLE)<EOL>if only_topics:<EOL><INDENT>result = result.exclude(bingofield__word__type=WORD_TYPE_META)<EOL><DEDENT>result = result.annotate(<EOL>votes=Sum("<STR_LIT>")).order_by("<STR_LIT>").values()<EOL>for item in result:<EOL><INDENT>item['<STR_LIT>'] = max(<NUM_LIT:0>, item['<STR_LIT>'])<EOL>if result[<NUM_LIT:0>]['<STR_LIT>'] != <NUM_LIT:0>:<EOL><INDENT>item['<STR_LIT>'] = float(item['<STR_LIT>']) / result[<NUM_LIT:0>]['<STR_LIT>'] * <NUM_LIT:100><EOL><DEDENT>else:<EOL><INDENT>item['<STR_LIT>'] = <NUM_LIT:0><EOL><DEDENT><DEDENT>return result<EOL>
returns a list with words ordered by the number of votes
annotated with the number of votes in the "votes" property.