Fix: missing import in misc/tools.py