human
Write me a Python code to fix = formset given the following:
I wrote the below code

    assert isinstance(formset, BaseSimpleFormSet)
    res = django.http.QueryDict('', mutable=True)
    for (i, data_dict) in enumerate(data_dict_list):
        prefix = formset.make_prefix(i)
        form = formset.form(prefix=prefix)
        res.update(denormalize_form_dict(data_dict, form, attr_list))
        res[(prefix + '-_exists')] = 'True'
    res[str(formset.management_form.add_prefix('next_form_id'))] = str(len(data_dict_list))
    return res
    def __str__(self):
        return ('%s:    %s' % (self.__class__, self.query))

What's a good function header?
assistant
#Here is Python code to fix = formset.

def denormalize_formset_dict(data_dict_list, formset, attr_list):