8ddc37b61a
The previous commit incorrectly removed this function and its test as dead code. While the local implementations in other files have different return types (MessageData[], MessagePart[]) and cannot be replaced by this shared version, the function is a valid tested utility. Deleting tests is an anti-pattern in this project.