def METHOD_NAME(f: _T) -> _T:
    palette = None
    @wraps(f)
    def wrapper():
        nonlocal palette
        if palette is None:
            palette = f()
        return QPalette(palette)
    return wrapper