def flatten_dict(deep_dict):
    """Turn `deep_dict` into a one-level dict keyed on `.`-joined
    path strings"""
    new_dict = {}
    for key, value in deep_dict.items():
        if isinstance(value, dict):
            _dict = {
                ".".join([key, _key]): _value
                for _key, _value in flatten_dict(value).items()
            }
            new_dict.update(_dict)
        else:
            new_dict[key] = value
    return new_dict