code: def pathname2url(path):
      """Convert the unicode path to a file: url"""
      lower_path = path.lower()
      if any((lower_path.startswith(x) for x in PASSTHROUGH_SCHEMES)):
          return path
      path_object = pathlib.Path(path)
      if path_object.is_absolute():
          # Produces a valid URI regardless of platform.
          return path_object.as_uri()
      # Produces CellProfiler's interpretation of a relative path URI.
      return FILE_SCHEME + urllib.request.pathname2url(path)
  
imports: import pathlib
  import urllib
  import logging
  from cellprofiler_core.constants.image import FILE_SCHEME, PASSTHROUGH_SCHEMES
  from cellprofiler_core.utilities.image import is_file_url
label_desc: Use image node_id 1 for calling a global function with example usage: pathname2url(path) and returns: unknown, path, path_object