A Methodology for Generating Time-Varying Complex Networks with Community Structure