Refactor _get_example, add cleandoc
cleandoc, add_indent and proper formatting