code: def _grouped(iterable, n):
          
          args = [iter(iterable)] * n
          return [[e for e in t if not e is None] for t in zip_longest(*args, fillvalue=None)]
docs: take a list of items and return a list of groups of size n.
          :param n: the size of the groups to return