<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def querydict_to_multidict(query_dict, wrap=None):
 """ Returns a new `webob.MultiDict` from a `django.http.QueryDict`. If `wrap` is provided, it's used to wrap the values. """

    wrap = wrap or (lambda val: val)
    return MultiDict(chain.from_iterable(
        six.moves.zip(repeat(key), (wrap(v) for v in vals))
        for key, vals in six.iterlists(query_dict)
    ))