Copied in the functions from my personal code library that groups.py made use of
Missed a spot