def url_join(base, *args):
    """
    Helper function to join an arbitrary number of url segments together.
    """
    scheme, netloc, path, query, fragment = urlsplit(base)
    path = path if len(path) else "/"
    path = posixpath.join(path, *[(x % '%s') for x in args])
    return urlunsplit([scheme, netloc, path, query, fragment])
dataset/ETHPy150Open samgiles/slumber/slumber/utils.py/url_join/swapped operands of `%`