Rearrange imports in pinger.py.

Also gets rid of an unused import.