Python Defaultdict Typeerror First Argument Must Be Callable Or None