code: def parse_registry_uri(uri: str) -> RegistryURI:
      
      validate_registry_uri(uri)
      parsed_uri = parse.urlparse(uri)
      authority = parsed_uri.netloc
      pkg_name = parsed_uri.path.strip("/")
      pkg_version = parsed_uri.query.lstrip("version=").strip("/")
      return RegistryURI(authority, pkg_name, pkg_version)
docs: Validate and return (authority, pkg name, version) from a valid registry URI