/// Once the last transform function makes no changes, this function returns the updated tree and metadata.
/// If multiple rules apply to a node, the `select` function is used to choose which one to apply.
/// A 'rule group' represents a higher-priority set of rules which are applied to the entire tree before subsequent groups.
/// If multiple rules apply to a node, the `select` function is used to choose which one to apply.
/// This is an abstraction over [`reduce`], where each transform function attempts a rule group on each node.
pub fn reduce_with_rule_groups<T, M, R, S>(groups: &[&[R]], select: S, tree: T, meta: M) -> (T, M)