[python bindings] how to use python module variable in c++

the question is quite straightforward

I’d like to construct MLIR in python level and use it in C++ level

  1. python level
    with Context() as ctx:
    module = Module.parse(“builtin.module {}”)
  2. C++ level
    struct Foo {
    Foo(ModuleOp) {
    py::class_(m, “Foo”)

what will NotDefinedType be ?
Firstly, NotDefinedType is MlirModule, but it shows mismatched type
Python Module is based on PyModule class which is not available in MLIR api

Secondly, NotDefinedType is py::object and I found below comment in PybindAdaptors.h
/// Casts object <-> MlirModule.
template <>
struct type_caster
it doesn’t look what I want

could anyone help me ?