@not_implemented_for('directed')
def is_edge_cover(G, cover):
 return (set(G) <= set(chain.from_iterable(cover)))

@ not_implemented_for ( 'directed' ) def is_edge_cover ( G , cover ) : return ( set ( G ) <= set ( chain . from_iterable ( cover ) ) )
decides whether a set of edges is a valid edge cover of the graph .