I am using PyArrow to serialize data of a custom type. I have written a custom serializer and deserializer and registered it to the type in the context. The type looks something