def boundary_expansion(G, S):
 return (len(nx.node_boundary(G, S)) / len(S))

def boundary_expansion ( G , S ) : return ( len ( nx . node_boundary ( G , S ) ) / len ( S ) )
returns the boundary expansion of the set s .