pub fn gain(l2: &f32, gradient_sum: f32, hessian_sum: f32) -> f32
Calculate the gain given the gradient and hessian of the node.