@not_implemented_for('undirected')
def attracting_component_subgraphs(G, copy=True):
 for ac in attracting_components(G):
  if copy:
   (yield G.subgraph(ac).copy())
  else:
   (yield G.subgraph(ac))

@ not_implemented_for ( 'undirected' ) def attracting_component_subgraphs ( G , copy = True ) : for ac in attracting_components ( G ) : if copy : ( yield G . subgraph ( ac ) . copy ( ) ) else : ( yield G . subgraph ( ac ) )
generates a list of attracting component subgraphs from g .