<s> def chunked ( iterator , size ) : <EOL> chunk = [ ] <EOL> for item in iterator : <EOL> chunk . append ( item ) <EOL> if len ( chunk ) == size : <EOL> yield chunk <EOL> del chunk [ : ] <EOL> yield chunk </s>
