code: def parse_paths(uri, vfs=None):
      """Parse a URI or Apache VFS URL into its parts
  
      Returns: tuple
          (path, scheme, archive)
      """
      archive = scheme = None
      path = uri
      # Windows drive letters (e.g. "C:\") confuse `urlparse` as they look like
      # URL schemes
      if sys.platform == "win32" and re.match("^[a-zA-Z]\\:", path):
          return path, None, None
      if vfs:
          parts = urlparse(vfs)
          scheme = parts.scheme
          archive = parts.path
          if parts.netloc and parts.netloc != "localhost":
              archive = parts.netloc + archive
      else:
          parts = urlparse(path)
          scheme = parts.scheme
          path = parts.path
          if parts.netloc and parts.netloc != "localhost":
              if scheme.split("+")[-1] in CURLSCHEMES:
                  # We need to deal with cases such as zip+https://server.com/data.zip
                  path = (
                      f"{scheme.split('+')[-1]}://{parts.netloc}{path}"
                  )
              else:
                  path = parts.netloc + path
          if scheme in SCHEMES:
              parts = path.split("!")
              path = parts.pop() if parts else None
              archive = parts.pop() if parts else None
  
      scheme = None if not scheme else scheme
      return path, scheme, archive
  
imports: import sys
  import re
  from urllib.parse import urlparse
label_desc: Use image node_id 4 for calling a global function with example usage: parse_paths(uri, vfs) and returns: path,  scheme,  archive, path,  None,  None