code: def encode_path_for_uri(path: str) -> str:
      """Percent-encode non-URL characters in a path."""
      return quote(path.replace(os.sep, "/"))
  
file_path: BentoML/grpc-client/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 3 for calling a global function with example usage: encode_path_for_uri(path) and returns: quote