Instead of doing this and the reflection approach, I'd prefer to list the storage levels in Python. It's more repetitive, but it will be much easier to debug (e.g. no need to throw an exception below)