def METHOD_NAME(self):
    s = SerializableChild(foo=Simple(x=42, y=None), maybe_foo=Simple(x=43, y=None))
    s.set_state({"foo": {"x": 44, "y": None}, "maybe_foo": None})
    assert s.foo.x == 44
    assert s.maybe_foo is None
    with pytest.raises(ValueError, match="Unexpected fields"):
        Simple(0, "").set_state({"x": 42, "y": "foo", "z": True})