How to inline jitclass spec for defining an njit signature?

I am using an njit function.

The function creates a jitclass and returns this from the function.

How would I inline this in the signature typing?

Here is the jitclass spec:

tree_map_spec = [
    ("visited_nodes", types.bool_[:]),
    ("preds", types.int_[:]),
    ("short_dist", types.float32[:]),
    ("simpl_dist", types.float32[:]),
    ("cycles", types.float32[:]),
    ("origin_seg", types.int_[:]),
    ("last_seg", types.int_[:]),
    ("out_bearings", types.float32[:]),
    ("visited_edges", types.bool_[:]),
]

The reason I would like to inline the jitclass is to try to get caching working, and I am assuming the reason that caching won’t work is because of the jitclass. i.e., I presently get these warnings in regards to caching:

NumbaWarning: Cannot cache compiled function as it uses dynamic globals (such as ctypes pointers and large global arrays)

Jitclass generally doesn’t work very well with caching- I prefer structref for such things.

Thanks. For now I’ve gone back to raw numpy arrays which seem to work more elegantly for the most part!