Given a big multiway tree A and a small multiway tree B, how can we know if B is a sub-structue of A?
A
B
Finally, I found a python package networkx which can solve my problem
networkx
gm = isomorphism.DiGraphMatcher(graph,subgraph, node_match) gm.subgraph_is_isomorphic()