Maximum-depth stopping rule.
stop_max_depth.RdCreates a stopping rule that stops splitting when a node's depth reaches
max_depth. Depth is zero-based at the root, so max_depth(k)
allows at most k + 1 levels. Mode-agnostic: useful for bounding
tree complexity in both classification and regression trees.