I have a graph g, a destination node set dst\_nodes, and a source node set src\_nodes. I want to find all edges that start from nodes in src\_nodes and point to nodes in dst\_nodes, and use these edges to construct a DGLBlock. In other words, I want to extract a subgraph (as DGLBlock), in which the edges are the edges in g such that u -> v, u β src\_nodes, v β dst\_nodes.
How can I do it efficiently considering the src\_nodes and dst\_nodes sets could be large?