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

    """Decorator to check whether the user can access creator dashboard
    page.
    """
    def test_can_access(self, **kwargs):
        if (self.user_id is None):
            raise self.NotLoggedInException
        if (role_services.ACTION_ACCESS_CREATOR_DASHBOARD in self.actions):
            return handler(self, **kwargs)
        else:
            raise base.UserFacingExceptions.UnauthorizedUserException('You    do    not    have    credentials    to    access    creator    dashboard.')
    test_can_access.__wrapped__ = True
    return test_can_access