human
Here's a good function header given the following:
I wrote the below code

    def convert(value, doseq=False):
        if (doseq and isinstance(value, list)):
            return [convert(v) for v in value]
        else:
            return utils.safestr(value)
    query = dict([(k, convert(v, doseq)) for (k, v) in query.items()])
    return urllib.urlencode(query, doseq=doseq)

What's a good function header?
assistant
#Here's a good function header.

def urlencode(query, doseq=0):