Adding in the Timeout decorator I found in a Stackoverflow answer that allows you to set a timeout for any other callable.
Adding IP to Hostname and Hostname to IP via the socket library.
Clamp a number between a max and a min.
Creating sparse files for loopback images can be done with the dd command. The ascii_only strips all non-ascii characters out of a string.