#NEWLINE# def __sub__( self , other ) : #NEWLINE# #INDENT# nodes = Subgraph . nodes #NEWLINE# relationships = Subgraph . relationships #NEWLINE# r = ( relationships ( self ) - relationships ( other ) ) #NEWLINE# n = ( ( nodes ( self ) - nodes ( other ) ) | set ( ) . union ( * ( nodes ( rel ) for rel in r ) ) ) #NEWLINE# return Subgraph ( n , r )