Implementing an external-tool-based `callHierarchyProvider`

I’m extending HierarchyProvider, CallHierarchyBrowserBase and PyCallHierarchyTreeStructureBase. These classes’ methods are either called under read action or in EDT, so I can’t run a synchronous process (runBlockingCancellable { ... }) without triggering an error.

The documentation says I’m supposed to either get rid of the read action, or switch to a different thread and then invoke a callback. Since I don’t call these methods, the former isn’t a choice. As for the latter, what kind of callback should I use, and where do I put it?

(The problematic part of the (WIP) code can be found here.)