fn next_filtered_sibling<'a>( node: Option<Node<'a>>, filter: &impl Fn(&Node<'_>) -> FilterResult, ) -> Option<Node<'a>>