util/deps: adds deps helper and test cases; #372