code: def hide_url_password(url):
      
      try:
          parsed = parse.urlsplit(url)
          if parsed.password:
              return url.replace(':%s@' % parsed.password, ':*****@')
      except Exception:  # pylint: disable=W0703
          pass
      return url
docs: Replace a password part of a URL with *****.
  
      This can be used to scrub URLs before logging them.