Computational methods for hidden semi-Markov models with mixed effects -- application to plant and root branching patterns