Add PolymorphicType to compound.py allowing inheritance based types.