``dynamic_type`` doesn't need to be optional here, and it should have a better name. Maybe ``metaclass`` or ``type_registry``.