code: def path_to_string(path):
      """Convert `PathLike` objects to their string representation.
  
      If given a non-string typed path object, converts it to its string
      representation.
  
      If the object passed to `path` is not among the above, then it is
      returned unchanged. This allows e.g. passthrough of file objects
      through this function.
  
      Args:
        path: `PathLike` object that represents a path
  
      Returns:
        A string representation of the path argument, if Python support exists.
      """
      if isinstance(path, os.PathLike):
          return os.fspath(path)
      return path
  
label_desc: Use image node_id 1 for calling a global function with example usage: path_to_string(path) and returns: path, os