#NEWLINE# def most_common( self , n = None ) : #NEWLINE# #INDENT# "List the n most common elements and their counts from the most\n        common to the least.  If n is None, then list all element counts.\n\n        >>> Counter('abracadabra').most_common(3)\n        [('a', 5), ('r', 2), ('b', 2)]\n\n        " #NEWLINE# if ( n is None ) : #NEWLINE# #INDENT# return sorted ( self . iteritems ( ) , key = itemgetter ( 1 ) , reverse = True ) #NEWLINE# #UNINDENT# return nlargest ( self , self . iteritems ( ) , key = itemgetter ( 1 ) )