Modified Duration calculations

When converting between modified duration and Macaulay duration, what periodicity should be used for the rates?

There is a problem in which the annualized Macaulay duration is used, and the YTM is given on a semiannual bond basis, but the modified duration is calculated using (annualized macaulay duration) / (1 + YTM / 2). I do not understand why the semi-annual YTM is used for this calculation, considering that the MacDur has been annualized.

https://www.analystforum.com/forums/cfa-forums/cfa-level-iii-forum/91364379

This might help