spam plugin removed unused import defaultdict