code: def _chunks(l, ncols):
      
      assert isinstance(ncols, int), "ncols must be an integer"
      for i in range(0, len(l), ncols):
          yield l[i: i+ncols]
docs: Yield successive n-sized chunks from list, l.