def dict_list2tuple(dict_obj):
    """ Convert all list element in the dict to tuple """
    for key, value in dict_obj.items():
        if isinstance(value, dict):
            for inner_key, inner_v in value.items():
                if isinstance(inner_v, list):
                    dict_obj[key][inner_key] = tuple(inner_v)
        else:
            if isinstance(value, list):
                dict_obj[key] = tuple(value)
                for idx, item in enumerate(value):
                    item = value[idx]
                    if isinstance(item, dict):
                        value[idx] = dict_list2tuple(item)

    return dict_obj