def METHOD_NAME(func):
    @functools.wraps(func)
    def wrapped_func(*args, **kwargs):
        @st.cache(**internal_cache_kwargs)
        def get_cache_entry(func, args, kwargs):
            class ButtonCacheEntry:
                def __init__(self):
                    self.evaluated = False
                    self.return_value = None
                def evaluate(self):
                    self.evaluated = True
                    self.return_value = func(*args, **kwargs)
            return ButtonCacheEntry()
        cache_entry = get_cache_entry(func, args, kwargs)
        if not cache_entry.evaluated:
            if st.sidebar.button(label):
                cache_entry.evaluate()
            else:
                raise st.ScriptRunner.StopException
        return cache_entry.return_value
    return wrapped_func