code: def _register_parser(cls):
      '''class decorator to register msg parser'''
      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 clf _register_parser(cls):
      '''class decorator to register msg parser'''
      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
docs: class decorator to register msg parser