def METHOD_NAME(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()