def METHOD_NAME(self, **kwargs):
    detector = self.inference_state.execution_recursion_detector
    limit_reached = detector.push_execution(self)
    try:
        if limit_reached:
            result = default
        else:
            result = func(self, **kwargs)
    finally:
        detector.pop_execution()
    return result