#NEWLINE# def get_badges_with_count( self ) : #NEWLINE# #INDENT# 'Returns the badges with the count in a list.  The keys of the\n        dict are the badge identifiers, not the badge objects.\n        ' #NEWLINE# result = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for badge in self . badges : #NEWLINE# #INDENT# result [ badge . identifier ] = ( result . get ( badge . identifier , 0 ) + 1 ) #NEWLINE# #UNINDENT# return result