Add getNsClassOptimizer [ci skip]
Merge from master