We use this in a few places so it'll be good to have a general utility function that users can use too