Move shared helpers over from cats

[#78293086]

Signed-off-by: Michael Fraenkel <fraenkel@us.ibm.com>