since we have the opposite function here https://github.com/mozilla-services/circus/blob/master/circus/util.py#L116

do you mind moving that function in util and add a test in test_util ?

Thanks!