human
Complete this python program:
def can_access_moderator_page(handler):
assistant
#Here is the Python code you requested.

    """Decorator to check whether user can access moderator page.
    """
    def test_can_access_moderator_page(self, **kwargs):
        if (not self.user_id):
            raise base.UserFacingExceptions.NotLoggedInException
        if (role_services.ACTION_ACCESS_MODERATOR_PAGE in self.actions):
            return handler(self, **kwargs)
        raise self.UnauthorizedUserException('You    do    not    have    credentials    to    access    moderator    page.')
    test_can_access_moderator_page.__wrapped__ = True
    return test_can_access_moderator_page