#NEWLINE# def _check_connectivity( G ) : #NEWLINE# #INDENT# result = nx . k_components ( G ) #NEWLINE# for ( k , components ) in result . items ( ) : #NEWLINE# #INDENT# if ( k < 3 ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# for component in components : #NEWLINE# #INDENT# C = G . subgraph ( G ) #NEWLINE# assert_true ( ( nx . node_connectivity ( C ) >= k ) )