def METHOD_NAME(self, object, func, *args, **kwargs):
    identifier = MethodIdentifier(func.__name__, args, kwargs)
    if identifier in self.cached:
        return self.cached[identifier]
    elif func.__name__ in self.getter_to_setters_name:
        self.cached[identifier] = func(object, *args, **kwargs)
        setattr(func, "under_cache", False)
        return self.cached[identifier]
    else:
        if (
            func.__name__ in self.setter_to_getter_names
            and self.setter_to_getter_names[func.__name__] in self.cached
        ):
            del self.cached[self.setter_to_getter_names[func.__name__]]
        return func(object, *args, **kwargs)