def author_to_dict(obj):
def default():<EOL><INDENT>raise RuntimeError("<STR_LIT>".format(t=type(obj).__name__))<EOL><DEDENT>return {<EOL>'<STR_LIT>': lambda x: {'<STR_LIT:name>': x.name, '<STR_LIT:email>': x.email},<EOL>'<STR_LIT>': lambda x: x._identity,<EOL>}.get(type(obj).__name__, lambda x: default())(obj)<EOL>
Who needs a switch/case statement when you can instead use this easy to
    comprehend drivel?