def to_dict(self, include_null=True):
if include_null:<EOL><INDENT>return dict(self.items())<EOL><DEDENT>else:<EOL><INDENT>return {<EOL>attr: value<EOL>for attr, value in self.__dict__.items()<EOL>if not attr.startswith("<STR_LIT>")<EOL>}<EOL><DEDENT>
Convert to dict.

:rtype: dict