def METHOD_NAME(self, x, y, *, sample_weight=1.0, tree=None):
    """Update the node with the provided sample.
    Parameters
    ----------
    x
        Sample attributes for updating the node.
    y
        Target value.
    sample_weight
        Sample weight.
    tree
        Tree to update.
    Notes
    -----
    This base implementation defines the basic functioning of a learning node.
    All classes overriding this method should include a call to `super().learn_one`
    to guarantee the learning process happens consistently.
    """
    self.update_stats(y, sample_weight)
    if self.is_active():
        self.update_splitters(x, y, sample_weight, tree.nominal_attributes)