code: def consume(iterator, n=None):
      """Advance *iterable* by *n* steps. If *n* is ``None``, consume it
      entirely.
  
      Efficiently exhausts an iterator without returning values. Defaults to
      consuming the whole iterator, but an optional second argument may be
      provided to limit consumption.
  
          >>> i = (x for x in range(10))
          >>> next(i)
          0
          >>> consume(i, 3)
          >>> next(i)
          4
          >>> consume(i)
          >>> next(i)
          Traceback (most recent call last):
            File "<stdin>", line 1, in <module>
          StopIteration
  
      If the iterator has fewer items remaining than the provided limit, the
      whole iterator will be consumed.
  
          >>> i = (x for x in range(3))
          >>> consume(i, 5)
          >>> next(i)
          Traceback (most recent call last):
            File "<stdin>", line 1, in <module>
          StopIteration
  
      """
      # Use functions that consume iterators at C speed.
      if n is None:
          # feed the entire iterator into a zero-length deque
          deque(iterator, maxlen=0)
      else:
          # advance to the empty slice starting at position n
          next(islice(iterator, n, n), None)
  
imports: import warnings
  from collections import deque
  from itertools import chain, combinations, count, cycle, groupby, islice, repeat, starmap, tee, zip_longest
  import operator
  from random import randrange, sample, choice
label_desc: Use image node_id 4 for calling a global function with example usage: consume(iterator, n) without return types