<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parse_qs(qs, keep_blank_values=0, strict_parsing=0, keep_attr_order=True):
 """ Kind of like urlparse.parse_qs, except returns an ordered dict. Also avoids replicating that function's bad habit of overriding the built-in 'dict' type. Taken from below with modification: <https://bitbucket.org/btubbs/thumpy/raw/8cdece404f15/thumpy.py> """

    od = DefaultOrderedDict(list) if keep_attr_order else defaultdict(list)
    for name, value in parse_qsl(qs, keep_blank_values, strict_parsing):
        od[name].append(value)

    return od