code: def chunk(self, iterable, n, fillvalue=None):
      "itertools recipe: Collect data into fixed-length chunks or blocks"
      # grouper('ABCDEFG', 3, 'x') --> ABC DEF Gxx
      args = [iter(iterable)] * n
      return izip_longest(fillvalue=fillvalue, *argsf chunk(self, iterable, n, fillvalue=None):
      "itertools recipe: Collect data into fixed-length chunks or blocks"
      # grouper('ABCDEFG', 3, 'x') --> ABC DEF Gxx
      args = [iter(iterable)] * n
      return izip_longest(fillvalue=fillvalue, *args)
docs: itertools recipe: Collect data into fixed-length chunks or blocks