Use recursive ast visitor to cleanup the default args.
Turn if stmt in assert. Must not happen.
Indents.
Iterate only on the top-level decls.
Indents.
Shorten code. Make it more readable.
Simplify code.