should this be in dimagi-utils?