docs: def generate_tuple_batches(qs, batch_len=1):
      """Iterate through a queryset in batches of length `batch_len`
  
      >>> [batch for batch in generate_tuple_batches(range(7), 3)]
      [(0, 1, 2), (3, 4, 5), (6,)]
      """
      num_items, batch = 0, []
      for item in qs:
          if num_items >= batch_len:
              yield tuple(batch)
              num_items = 0
              batch = []
          num_items += 1
          batch += [item]
      if num_items:
          yield tuple(batch)