def _register_parser(cls):
 assert (cls.cls_msg_type is not None)
 assert (cls.cls_msg_type not in _MSG_PARSERS)
 _MSG_PARSERS[cls.cls_msg_type] = cls.parser
 return cls

def _register_parser ( cls ) : assert ( cls . cls_msg_type is not None ) assert ( cls . cls_msg_type not in _MSG_PARSERS ) _MSG_PARSERS [ cls . cls_msg_type ] = cls . parser return cls
class decorator to register msg parser .