def build_uri(endpoint, api_version, uri_parts, uri_args={}):
    """ Build the URL using the endpoint, the api version, the uri parts and the args.
    
        :param dict uri_args: parameters to include in the URL. 
        :param tuple uri_parts: url encoded and `uri_parts` too.
        :return: A string that represents the absolute URL of the request
        :rtype : str
    
        The resulting uri is as follows:
    
        {endpoint}/{api_version}/{uri_part1}/.../{uri_partn}?{uri_args}
        
        The `uri_args` and the `uri_parts` are url encoded.
    """
    # to unicode
    uri_parts = [unicode(x) for x in uri_parts]
    # and encoded 
    uri_parts = [urllib.quote(x) for x in uri_parts]
    # Add enpoint and version 
    all_uri_parts = [endpoint, api_version, ] + uri_parts
    # join parts
    url_to_call = "/".join(all_uri_parts)
    # add params if any
    if uri_args:
        url_to_call = "{}?{}".format(url_to_call, urllib.urlencode(uri_args))
    # return
    return url_to_call
Build the URL using the endpoint, the api version, the uri parts and the args.
    
        :param dict uri_args: parameters to include in the URL. 
        :param tuple uri_parts: url encoded and `uri_parts` too.
        :return: A string that represents the absolute URL of the request
        :rtype : str
    
        The resulting uri is as follows:
    
        {endpoint}/{api_version}/{uri_part1}/.../{uri_partn}?{uri_args}
        
        The `uri_args` and the `uri_parts` are url encoded.