def attribute_assortativity_coefficient(G, attribute, nodes=None):
 M = attribute_mixing_matrix(G, attribute, nodes)
 return attribute_ac(M)

def attribute_assortativity_coefficient ( G , attribute , nodes = None ) : M = attribute_mixing_matrix ( G , attribute , nodes ) return attribute_ac ( M )
compute assortativity for node attributes .