An implementation of the generalized Lusztig–Shoji algorithm