fn write_pattern( output: &mut String, pattern: &Pattern<String>, transform: &impl Fn(&str) -> Cow<'_, str>, )