There's not much to say here. This case is the most common one.
We have the example of when we was implementing our firewall application, and we've needed a function to list the network interfaces. We found at least two implementations, and as they weren't in a shared library, we needed to create a new copy of it