You could just make `source_dict` a `defaultdict(list)`.