Make the model:prune
command easier to extend
#43919
Merged
model:prune
command easier to extend
#43919