def update_tree_leaf(self, leaf, indices_in_leaf, X, y, y_pred, sample_weight, update_mask, residual):
        leaf_y = y[indices_in_leaf]
        y_signed = 2 * leaf_y - 1
        leaf_weights = sample_weight[indices_in_leaf]
        residual_abs = expit(numpy.clip(-y_signed * y_pred[indices_in_leaf], -10, 10))
        nominator = numpy.sum(y_signed * residual_abs * leaf_weights)
        denominator = numpy.sum(residual_abs * (1 - residual_abs) * leaf_weights)
        return (denominator + self.adjusted_regularization) / nominator
dataset/ETHPy150Open anaderi/lhcb_trigger_ml/hep_ml/losses.py/BinomialDevianceLossFunction.update_tree_leaf/swapped operands of `/`