def to_dict(self, lev=<NUM_LIT:0>):
_spec = self.c_param<EOL>_res = {}<EOL>lev += <NUM_LIT:1><EOL>for key, val in self._dict.items():<EOL><INDENT>try:<EOL><INDENT>(_, req, _ser, _, null_allowed) = _spec[str(key)]<EOL><DEDENT>except KeyError:<EOL><INDENT>try:<EOL><INDENT>_key, lang = key.split("<STR_LIT:#>")<EOL>(_, req, _ser, _, null_allowed) = _spec[_key]<EOL><DEDENT>except (ValueError, KeyError):<EOL><INDENT>try:<EOL><INDENT>(_, req, _ser, _, null_allowed) = _spec['<STR_LIT:*>']<EOL><DEDENT>except KeyError:<EOL><INDENT>_ser = None<EOL><DEDENT><DEDENT><DEDENT>if _ser:<EOL><INDENT>val = _ser(val, "<STR_LIT>", lev)<EOL><DEDENT>if isinstance(val, Message):<EOL><INDENT>_res[key] = val.to_dict(lev + <NUM_LIT:1>)<EOL><DEDENT>elif isinstance(val, list) and isinstance(<EOL>next(iter(val or []), None), Message):<EOL><INDENT>_res[key] = [v.to_dict(lev) for v in val]<EOL><DEDENT>else:<EOL><INDENT>_res[key] = val<EOL><DEDENT><DEDENT>return _res<EOL>
Return a dictionary representation of the class

:return: A dict