<p>We consider a good practice to convert a <code>defaultdict</code> to <code>dict</code> after done building it, because code down the stack probably expects dict-like objects to behave as a regular <code>dict</code> and throw <code>KeyError</code>.</p>