<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def apply(self, joinpoint):
 """Apply this advice on input joinpoint. TODO: improve with internal methods instead of conditional test. """


        if self._enable:
            result = self._impl(joinpoint)

        else:
            result = joinpoint.proceed()

        return result