in reply to Do I understand this?

Yup, looks like roll-your-own-template cleverness.   If you can get rid of it, do so.   And if you can’t, document the hell out of it ...