<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_permission(self, request, page, permission):
 """ Runs the custom permission check and raises an exception if False. """

        if not getattr(page, "can_" + permission)(request):
            raise PermissionDenied