Network Heterogeneity Tests and Network-Based Clustering R Package