docs: def _task_batcher(tasks, batch_size=None):
      """Batches large task lists into groups of 100 so that they can all be
      inserted.
      """
      from itertools import izip_longest
  
      if not batch_size:
          batch_size = DEFAULT_TASK_BATCH_SIZE
  
      # Ensure the batch size is under the task api limit.
      batch_size = min(batch_size, 100)
  
      args = [iter(tasks)] * batch_size
      return ([task for task in group if task] for group in izip_longest(*args))