@classmethod
def _merge_dicts(cls, default_dict, override_dict):
    """Recursively merge a default dict and an overriding dict."""
    for k in set(override_dict.keys()).union(default_dict.keys()):
        if k in default_dict and k in override_dict:
            if isinstance(default_dict[k], dict) and isinstance(override_dict
                [k], dict):
                yield k, dict(cls._merge_dicts(default_dict[k],
                    override_dict[k]))
            else:
                yield k, override_dict[k]
        elif k in default_dict:
            yield k, default_dict[k]
        else:
            yield k, override_dict[k]
