def test_serializer_return_type_model() -> None:
    """https://github.com/pydantic/pydantic/issues/10443"""

    class Sub(BaseModel):
        pass

    class Model(BaseModel):
        sub: Annotated[
            Sub,
            PlainSerializer(lambda v: v, return_type=Sub),
        ]

    assert Model(sub=Sub()).model_dump() == {'sub': {}}
https://github.com/pydantic/pydantic/issues/10443
tests/test_serialize.py