If you generate with the option --associated-with module then the resulting OCaml module shouldn't need a type t or the of_pyo and to_pyo functions. But currently they are generated.
Look in to whether we can drop some of the extra functions in certain situations like these.