python/samdb: add option to specify types of group members