def redact_netloc(netloc):<EOL>
netloc, (user, password) = split_auth_from_netloc(netloc)<EOL>if user is None:<EOL><INDENT>return netloc<EOL><DEDENT>password = '<STR_LIT>' if password is None else '<STR_LIT>'<EOL>return '<STR_LIT>'.format(user=urllib_parse.quote(user),<EOL>password=password,<EOL>netloc=netloc)<EOL>
Replace the password in a netloc with "****", if it exists.

For example, "user:pass@example.com" returns "user:****@example.com".