Add docstring to example funtion

Also made a minor PEP8 change