Repair example.rst

Move import of pathlib into functions