def recursive_asdict(d):
out = {}<EOL>for k, v in asdict(d).iteritems():<EOL><INDENT>if hasattr(v, '<STR_LIT>'):<EOL><INDENT>out[k] = recursive_asdict(v)<EOL><DEDENT>elif isinstance(v, list):<EOL><INDENT>out[k] = []<EOL>for item in v:<EOL><INDENT>if hasattr(item, '<STR_LIT>'):<EOL><INDENT>out[k].append(recursive_asdict(item))<EOL><DEDENT>else:<EOL><INDENT>out[k].append(item)<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>out[k] = v<EOL><DEDENT><DEDENT>return out<EOL>
Convert Suds object into serializable format.