<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def encode_http_params(**kw):
    '''
    url paremeter encode
    '''
    try:
        _fo = lambda k, v: '{name}={value}'.format(
            name=k, value=to_basestring(quote(v)))
    except:
        _fo = lambda k, v: '%s=%s' % (k, to_basestring(quote(v)))

    _en = utf8

    return '&'.join([_fo(k, _en(v)) for k, v in kw.items() if not is_empty(v)])