This function can then be used in conjunction with `similar_graph` to construct `subgraph` generically.
This function can then be used in conjunction with
similar_graphto constructsubgraphgenerically.