Changed import statement for defaultdict collection