code: def chunks(iterable, size=50):
      
      batch = []
      for n in iterable:
          batch.append(n)
          if len(batch) % size == 0:
              yield batch
              batch = []
      if batch:
          yield batch
docs: Break an iterable into lists of size