mod2doctest is a module that converts a python module to a doctest  compatible docstring.