def _clean_dirty(self, obj=None):
obj = obj or self<EOL>obj.__dict__['<STR_LIT>'].clear()<EOL>obj._dirty = False<EOL>for key, val in vars(obj).items():<EOL><INDENT>if isinstance(val, BaseObject):<EOL><INDENT>self._clean_dirty(val)<EOL><DEDENT>else:<EOL><INDENT>func = getattr(val, '<STR_LIT>', None)<EOL>if callable(func):<EOL><INDENT>func()<EOL><DEDENT><DEDENT><DEDENT>
Recursively clean self and all child objects.