#NEWLINE# def _process_carryover( deltas , carry_over ) : #NEWLINE# #INDENT# 'A helper function to process negative deltas based on the deltas\n    and the list of tuples that contain the carry over values' #NEWLINE# for ( smaller , larger , amount ) in carry_over : #NEWLINE# #INDENT# if ( deltas [ smaller ] < 0 ) : #NEWLINE# #INDENT# deltas [ larger ] -= 1 #NEWLINE# deltas [ larger ] += amount