<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def url_add_params(url, **kwargs):
 """ Add parameters to an url 'http://example.com/?a=1&b=3' 'http://example.com/?c=8&a=1&b=3' 'http://example.com/?a=1&b=3#/irock' 'http://example.com/?id=10&a=1&b=3#/irock' """

    parsed_url = urlparse.urlsplit(url)
    params = urlparse.parse_qsl(parsed_url.query)
    parsed_url = list(parsed_url)

    for pair in kwargs.iteritems():
        params.append(pair)

    parsed_url[3] = urllib.urlencode(params)
    return urlparse.urlunsplit(parsed_url)