Added ToVarGraphSequence, ToGraphPerGroup functions. Also added functions for iterating over the sequence of graphs one at a time, in order to use memory more efficiently