parameters: (netloc)
return_statement: return '{user}{password}@{netloc}'.format(user=urllib_parse.quote(user),
                                                password=password,
                                                netloc=netloc)
docstring: Replace the password in a netloc with "****", if it exists.
  
      For example, "user:pass@example.com" returns "user:****@example.com".
docstring_summary: Replace the password in a netloc with "****", if it exists.
docstring_tokens: Replace the password in a netloc with **** if it exists .
function: def redact_netloc(netloc):
      # type: (str) -> str
      """
      Replace the password in a netloc with "****", if it exists.
  
      For example, "user:pass@example.com" returns "user:****@example.com".
      """
      netloc, (user, password) = split_auth_from_netloc(netloc)
      if user is None:
          return netloc
      password = '' if password is None else ':****'
      return '{user}{password}@{netloc}'.format(user=urllib_parse.quote(user),
                                                password=password,
                                                netloc=netloc)
function_tokens: def redact_netloc ( netloc ) : # type: (str) -> str netloc , ( user , password ) = split_auth_from_netloc ( netloc ) if user is None : return netloc password = '' if password is None else ':****' return '{user}{password}@{netloc}' . format ( user = urllib_parse . quote ( user ) , password = password , netloc = netloc )