Move some functions to terablogger.utils.