Bind type to python

Hi everyone,
I’m facing the problem of binding my custom type to python.Specifically, I have three questions:
1. MLIR python binding documentation tells me that I can use include/mlir/Bindings/Python/PybindAdaptors.h to help me bind my type to python. However, this file provids various type_casters and mlir_*_subclasses. How can I use these classes and casters to bind types, by inheriting mlir_type_subclass or other ways?
2. How should I manage my CMakeLists.txt? My current CMakeLists.txt is written in imitation of mlir python/CMakeLists.txt, and where should I add binding source files(and header files)?
3. If I successfully bind my types, where should I visit my type in python? In or or other packages?

There is upstream usage of mlir_type_subclass, e.g., in You can follow that as an example.

It works! Thanks a lot!