code: def chunker(f, n):
      
      f = iter(f)
      x = []
      while 1:
          if len(x) < n:
              try:
                  x.append(f.next())
              except StopIteration:
                  if len(x) > 0:
                      yield tuple(x)
                  break
          else:
              yield tuple(x)
              x = []
docs: Utility function to split iterable `f` into `n` chunks