Using the networkx module, I do some network analysis under Python 3.2, where I need to project a bipartite graph (of inmates linked to their cell: input graph B in the code below) to a subgraph (linking cellmates to each other if both had an overlapping spell in the same cell: using the input of set nodes defining the inmate-nodes of graph B, generating output graph G). I don't need a special algorithm to come up with any or an optimal matching, I just need to collect all links that satisfy some conditions. Thus other SO posts I found do not really apply. But:Using the networkx module, I do some network an