debugging graph generation code