from typing import Generator, Sequence
from PIL import Image, ImageDraw, ImageFont
import os


def chunks(l: Sequence, n: int = 5) -> Generator[Sequence, None, None]:
    """Yield successive n-sized chunks from l."""
    for i in range(0, len(l), n):
        yield l[i : i + n]
