(self, value, attr, data, **kwargs)
| 36 | return super()._serialize(value, attr, obj, **kwargs) |
| 37 | |
| 38 | def _deserialize(self, value, attr, data, **kwargs): |
| 39 | val = super()._deserialize(value, attr, data, **kwargs) |
| 40 | if (context := Context[dict].get(None)) is not None: |
| 41 | val *= context.get("factor", 1) |
| 42 | return val |
| 43 | |
| 44 | class ContextSchema(Schema): |
| 45 | ctx_fld = ContextField() |