The whole thing looks like NIH package that bundled random stuff to "avoid dependencies", sigh.
See also https://github.com/Erotemic/ubelt#external-tools.
Ok, it definitely "liberates" a lot of code from random packages. What a piece of shit.