offload a tiny bit of work into python stdlib