Also, your custom ring parent class should make sure that is unique. Either derive from UniqueRepresentation (for Python classes) or use a factory function that ensures uniqueness (for Cython classes).