code: def path_to_uri(path: str) -> str:
      """
      Convert a path to a URI.
  
      Args:
          path: Path to convert to URI.
  
      Returns:
          URI string. (quoted, absolute)
      """
      path = os.path.abspath(path)
      if psutil.WINDOWS:
          return pathlib.PureWindowsPath(path).as_uri()
      if psutil.POSIX:
          return pathlib.PurePosixPath(path).as_uri()
      raise ValueError("Unsupported OS")
  
file_path: BentoML/src/bentoml/_internal/utils/uri.py
imports: import os
  import pathlib
  from urllib.parse import quote
  from urllib.parse import unquote
  from urllib.parse import urlparse
  from urllib.request import url2pathname
  import psutil
label_desc: Use image node_id 1 for calling a global function with example usage: path_to_uri(path) and returns: pathlib, pathlib