Useful python utilities and helpers