#NEWLINE# def get_achievement_frequency( ) : #NEWLINE# #INDENT# earned_achievements = api . achievement . get_earned_achievement_instances ( ) #NEWLINE# frequency = defaultdict ( int ) #NEWLINE# for achievement in earned_achievements : #NEWLINE# #INDENT# frequency [ achievement [ 'name' ] ] += 1 #NEWLINE# #UNINDENT# return frequency