'Deletes the GMState object and restores the class variables.'

def restore(self):

    if ((self.G1_node is not None) and (self.G2_node is not None)):
        del self.GM.core_1[self.G1_node]
        del self.GM.core_2[self.G2_node]
    for vector in (self.GM.inout_1, self.GM.inout_2):
        for node in list(vector.keys()):
            if (vector[node] == self.depth):
                del vector[node]
