Checking types between different python extensions

I have setup a minimal project that replicates the issue, it does contain a custom dialect, for which there are python bindings. The custom dialect has a type that can be used in a MemRef, and that’s the heart of the issue.