def to_dict(self):
try:<EOL><INDENT>data, _ = self.schema.dump(self)<EOL><DEDENT>except ValidationError as ex:<EOL><INDENT>raise ModelValidationError(<EOL>ex.messages, ex.field_names, ex.fields, ex.data, **ex.kwargs) from None<EOL><DEDENT>return data<EOL>
Serialize the model into a Python dict of simple types.

        Note that this method requires that the model is bound with
        ``@bind_schema``.