code: def get_batches(
      iterable: Iterable[T], *, batch_size: int
  ) -> Iterable[List[T]]:
      assert batch_size > 0
  
      source_iter = iter(iterable)
      while True:
          # return consequent slices of `batch_size` elements
          slices = islice(source_iter, batch_size)
          try:
              first_from_slice = next(slices)
          except StopIteration:
              # but if there's nothing to return in last slice, close generator instead of returning empty list
              return
          yield list(chain([first_from_slice], slices))
  
label_desc: Use image node_id 1 for calling a global function with example usage: get_batches(iterable) without return types