Coarse-Graining Dynamical Networks with Intrinsic Heterogeneities