code: def urldefragauth(url):
      
      scheme, netloc, path, params, query, fragment = urlparse(url)
  
      # see func:`prepend_scheme_if_needed`
      if not netloc:
          netloc, path = path, netloc
  
      netloc = netloc.rsplit('@', 1)[-1]
  
      return urlunparse((scheme, netloc, path, params, query, ''))
docs: Given a url remove the fragment and the authentication part.
  
      :rtype: str