class_docstr: Result of parsing a dataset URI/Path
  
  Attributes
  ----------
  path : str
      Parsed path. Includes the hostname and query string in the case
      of a URI.
  archive : str
      Parsed archive path.
  scheme : str
      URI scheme such as "https" or "zip+s3".
class_docstr_tok: ["Result","of","parsing","a","dataset","URI\/Path","Attributes","--","--","--","--","--","path",":","str","Parsed","path",".","Includes","the","hostname","and","query","string","in","the","case","of","a","URI",".","archive",":","str","Parsed","archive","path",".","scheme",":","str","URI","scheme","such","as","``","https","''","or","``","zip+s3","''","."]
code: def from_uri(cls, uri):
      parts = urlparse(uri)
      path = (
          pathlib.Path(parts.path).as_posix()
          if parts.path
          else parts.path
      )
      scheme = parts.scheme or None
  
      if parts.query:
          path += "?" + parts.query
  
      if scheme and scheme.startswith(("gzip", "tar", "zip")):
          path_parts = path.split("!")
          path = path_parts.pop() if path_parts else None
          archive = path_parts.pop() if path_parts else None
      else:
          archive = None
  
      if parts.scheme and parts.netloc:
          if archive:
              archive = parts.netloc + archive
          else:
              path = parts.netloc + path
  
      return _ParsedPath(path, archive, scheme)
  
file_path: rasterio/rasterio/_path.py
imports: import pathlib
  import re
  import sys
  from urllib.parse import urlparse
  import attr
  from rasterio.errors import PathError
label_desc: Use image node_id 1 for calling the _ParsedPath obj's underlying member method code with example usage: obj.from_uri(cls, uri) and returns: _ParsedPath