<s> class MaxIterCriterion ( object ) : <EOL> def __init__ ( self , observer_loop , max_iter ) : <EOL> self . observer_loop = observer_loop <EOL> self . max_iter = max_iter <EOL> self . iteration = <NUM_LIT:0> <EOL> def notify ( self ) : <EOL> self . iteration += <NUM_LIT:1> <EOL> if self . iteration >= self . max_iter : <EOL> self . observer_loop . stop ( ) </s>
