see e.g. https://gitlab.ost.ch/ins-courses/autpy/submissions/-/commit/e807775785f71754cf68801d00e13df1a7a8ca47