homophily_stat function

Calculate homophily in multi-edge graphs.