The fourth example engraver here: https://extending-lilypond.readthedocs.io/en/latest/extending/translation.html#fourth-engraver-example
Running this code in 2.24 crashes on initializing the engraver with In procedure ly:spanner-set-bound!: Wrong type argument in position 3 (expecting Item): ().