Check if specific group(s) are in context - Pyson

See: