In a reply to another question, @AndersDeleuran showed me how to get the path of the current script. That allows the construction of relative paths:
2024-04-14_document.gh (10.8 KB)
2024-04-14_function.gh (2.3 KB)
Personally, I find that a much more robust solution compared to specifying absolute paths.