Extract _unscale_grads helper in LossScaleOptimizer (#23412)