Update tools.py

Forgot to import 'random' module.