What is the correct (generic) way to generate a path (URL) to a static resource that an extention has?

Is this topic relevant? Static content for jupyterlab extension