human
I wrote the below code

    def _encode(L, k, v):
        if isinstance(v, unicode):
            L.append(('%s=%s' % (k, urllib.quote(v.encode('utf-8')))))
        elif isinstance(v, str):
            L.append(('%s=%s' % (k, urllib.quote(v))))
        elif isinstance(v, collections.Iterable):
            for x in v:
                _encode(L, k, x)
        else:
            L.append(('%s=%s' % (k, urllib.quote(str(v)))))
    args = []
    for (k, v) in kw.iteritems():
        _encode(args, k, v)
    return '&'.join(args)

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

def _encode_params(**kw):