#NEWLINE# def __and__( self , other ) : #NEWLINE# #INDENT# " Intersection is the minimum of corresponding counts.\n\n        >>> Counter('abbb') & Counter('bcc')\n        Counter({'b': 1})\n\n        " #NEWLINE# if ( not isinstance ( other , Counter ) ) : #NEWLINE# #INDENT# return NotImplemented #NEWLINE# #UNINDENT# _min = min #NEWLINE# result = Counter ( ) #NEWLINE# if ( len ( other ) < len ( other ) ) : #NEWLINE# #INDENT# ( self , other ) = ( other , self ) #NEWLINE# #UNINDENT# for elem in filter ( self . __contains__ , other ) : #NEWLINE# #INDENT# newcount = _min ( self [ elem ] , other [ elem ] ) #NEWLINE# if ( newcount > 0 ) : #NEWLINE# #INDENT# result [ elem ] = newcount #NEWLINE# #UNINDENT# #UNINDENT# return result