def consume(iterator, n):  
<EOL>if n is None:<EOL><INDENT>collections.deque(iterator, maxlen=<NUM_LIT:0>)<EOL><DEDENT>else:<EOL><INDENT>next(islice(iterator, n, n), None)<EOL><DEDENT>
Advance the iterator n-steps ahead. If n is none, consume entirely.