<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def register_eventclass(event_id):
 """Decorator for registering event classes for parsing """

    def register(cls):
        if not issubclass(cls, Event):
            raise MessageException(('Cannot register a class that'
                                    ' is not a subclass of Event'))
        EVENT_REGISTRY[event_id] = cls
        logger.debug('######### Event registry is now: {0}'.format(
            EVENT_REGISTRY))
        return cls
    return register