code: def normalize_uri_result(uri):
      
      ref = uri_reference(uri).normalize()
  
      return ref._replace(
          authority=normalize_uri_authority(ref),
          query=normalize_uri_query(ref),
          path=normalize_uri_path(ref),
      )
docs: Normalize a URI (And return a URIResult)