#NEWLINE# def add( self , code , amount ) : #NEWLINE# #INDENT# if self . contains ( code ) : #NEWLINE# #INDENT# self . _allocations [ code ] += code #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _allocations [ code ] = amount