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

    """Decorator to check whether user can delete exploration.
    """
    def test_can_delete(self, exploration_id, **kwargs):
        if (not self.user_id):
            raise base.UserFacingExceptions.NotLoggedInException
        exploration_rights = rights_manager.get_exploration_rights(exploration_id, strict=False)
        if rights_manager.check_can_delete_exploration(self.user_id, self.actions, exploration_rights):
            return handler(self, exploration_id, **kwargs)
        else:
            raise base.UserFacingExceptions.UnauthorizedUserException(('User    %s    does    not    have    permissions    to    delete    exploration    %s' % (self.user_id, exploration_id)))
    test_can_delete.__wrapped__ = True
    return test_can_delete