Rewrote doctest for parsing api to python code.
Rewrote doctest for parsing core to python code.
Rewrote doctest for parsing overwrite to python code.
Rewrote doctest for parsing patch to python code.
Removed trailing whitespace.
Rewrote doctest for parsing subdir to python code.