Something I use a lot, so decided to write it up in python and save it for posterity to be used whenever it's needed