Is there a reason that we don't put this function in the library part of pypreprocess, so that it is importable?