I'm guessing that the reason you copied this code rather than importing it is because of a dependency in the defining library on the IO libraries. If that's the case, could you create an issue to split the IO-independent portions of that library out from the rest so that it can be re-used. If they decide to change the structure of the libraries file it would be good to be sharing the code.