def repeat_last(iterable):
    """Yield each item, then keep yielding the last one."""
    for item in iterable:
        yield item
    yield from repeat(item)
Yield each item, then keep yielding the last one.
nodezator/surfsman/icon.py