def _community(G, u, community):
 node_u = G.node[u]
 try:
  return node_u[community]
 except KeyError:
  raise nx.NetworkXAlgorithmError('No community information')

def _community ( G , u , community ) : node_u = G . node [ u ] try : return node_u [ community ] except KeyError : raise nx . NetworkXAlgorithmError ( 'No community information' )
get the community of the given node .