def METHOD_NAME(
    text: str,
    font: pygame.font.Font,
    fg: ColorLike,
    bg: ColorLike,
    rect: Rect,
) -> Generator[Tuple[Rect, pygame.surface.Surface], None, None]:
    line_height = guest_font_height(font)
    for line_index, line in enumerate(constrain_width(text, font, rect.width)):
        top = rect.top + line_index * line_height
        for scrap in build_line(line):
            if scrap[-1] == " ":
                # No need to blit a white sprite onto a white background
                continue
            dirty_length = font.size(scrap[:-1])[0]
            surface = shadow_text(font, fg, bg, scrap[-1])
            update_rect = surface.get_rect(
                top=top,
                left=rect.left + dirty_length,
            )
            yield update_rect, surface