A framework to generate and analyse networks