This can be used to auto-generated python<->ocaml bindings based on a cmi file.

Take a look at ../examples-gen/generated for an example.

write_ml writes the actual ml file containing the bindings. (E.g. in the above example it generates

Note, this returns a list of all the types that are needed.

write_types writes a separate file containing type conversion functions. It is expeected that the input to this function is the output of write_ml above.