def deep_convert_dict(value):
    """Converts any OrderedDict elements in a value to
    ordinary dictionaries, safe for storage in QSettings

    :param value: value to convert
    :type value: Union[dict,OrderedDict]

    :return: dict
    """
    to_ret = value
    if isinstance(value, OrderedDict):
        to_ret = dict(value)

    try:
        for k, v in to_ret.items():
            to_ret[k] = deep_convert_dict(v)
    except AttributeError:
        pass

    return to_ret
def deep_convert_dict ( value ) : to_ret = value if isinstance ( value , OrderedDict ) : to_ret = dict ( value ) try : for k , v in to_ret . items ( ) : to_ret [ k ] = deep_convert_dict ( v ) except AttributeError : pass return to_ret
Converts any OrderedDict elements in a value to
    ordinary dictionaries, safe for storage in QSettings

    :param value: value to convert
    :type value: Union[dict,OrderedDict]

    :return: dict