Keept this here :)  It's kind of specific to your needs, so doesn't quite belong in utils/general.py, I think.