code: def parse_path(path):
      """Parse a dataset's identifier or path into its parts
  
      Parameters
      ----------
      path : str or path-like object
          The path to be parsed.
  
      Returns
      -------
      ParsedPath or UnparsedPath
  
      Notes
      -----
      When legacy GDAL filenames are encountered, they will be returned
      in a UnparsedPath.
      """
      if isinstance(path, Path):
          return path
  
      # Windows drive letters (e.g. "C:\") confuse `urlparse` as they look like
      # URL schemes
      elif sys.platform == "win32" and re.match("^[a-zA-Z]\\:", path):
          return UnparsedPath(path)
  
      elif path.startswith("/vsi"):
          return UnparsedPath(path)
  
      elif re.match("^[a-z0-9\\+]*://", path):
          parts = urlparse(path)
  
          # if the scheme is not one of Rasterio's supported schemes, we
          # return an UnparsedPath.
          if parts.scheme and not all(
              p in SCHEMES for p in parts.scheme.split("+")
          ):
              return UnparsedPath(path)
  
          else:
              return ParsedPath.from_uri(path)
  
      else:
          return UnparsedPath(path)
  
file_path: Fiona/fiona/path.py
imports: import re
  import sys
  import attr
  from urllib.parse import urlparse
label_desc: Use image node_id 1 for calling a global function with example usage: parse_path(path) and returns: path, UnparsedPath, UnparsedPath, UnparsedPath, UnparsedPath, ParsedPath