| 1648 | write_context.write_string(method_name) |
| 1649 | |
| 1650 | def read(self, read_context): |
| 1651 | _authorize_callable_materialization(read_context.policy, self.cls) |
| 1652 | instance = read_context.read_ref() |
| 1653 | method_name = read_context.read_string() |
| 1654 | |
| 1655 | if self._use_default_policy: |
| 1656 | return getattr(instance, method_name) |
| 1657 | return _resolve_validated_bound_method( |
| 1658 | read_context.policy, |
| 1659 | instance, |
| 1660 | method_name, |
| 1661 | is_local=_is_local_receiver(instance), |
| 1662 | ) |
| 1663 | |
| 1664 | |
| 1665 | class ObjectSerializer(Serializer): |