def serialize(self) -> JsonDict:
        """Based on mypy.plugins.dataclasses.DataclassAttribute.serialize."""
        return {
            'name': self.name,
        }
Based on mypy.plugins.dataclasses.DataclassAttribute.serialize.
pydantic/mypy.py