def uri_with(uri, scheme=None, netloc=None, path=None, params=None, query=None, fragment=None):
old_scheme, old_netloc, old_path, old_params, old_query, old_fragment = urlparse(uri)<EOL>path, _netloc = _normalize_win_path(path)<EOL>return urlunparse((<EOL>scheme or old_scheme,<EOL>netloc or old_netloc,<EOL>path or old_path,<EOL>params or old_params,<EOL>query or old_query,<EOL>fragment or old_fragment<EOL>))<EOL>
Return a URI with the given part(s) replaced.

    Parts are decoded / encoded.