def restoreSnapshot(self, snapshotDict):
        # Clear out the existing DAG
        self.network.clear()
        self.staleNodeDict.clear()
        self.nodeGroupDict.clear()
        
        # Loads of nodes
        for n in snapshotDict["NODES"]:
            nodeType = n["TYPE"]
            newNode = depends_util.classTypeNamedFromModule(nodeType, 'depends_node')
            newNode.name = n["NAME"]
            newNode.uuid = uuid.UUID(n['UUID'])
            stale = (n["STALE"] == "True")
            for i in n["INPUTS"]:
                newNode.setInputValue(i["NAME"], i["VALUE"])
                newNode.setInputRange(i["NAME"], i["RANGE"])
            for o in n["OUTPUTS"]:
                for s in o["VALUE"]:
                    newNode.setOutputValue(o["NAME"], s, o["VALUE"][s])
                    if o["RANGE"]:
                        newNode.setOutputRange(o["NAME"], (o["RANGE"][0], o["RANGE"][1]))
            for a in n["ATTRIBUTES"]:
                newNode.setAttributeValue(a["NAME"], a["VALUE"])
                newNode.setAttributeRange(a["NAME"], a["RANGE"])
            self.addNode(newNode, stale)
            
        # Edge loads
        for e in snapshotDict["EDGES"]:
            fromNode = self.node(nUUID=uuid.UUID(e["FROM"]))
            toNode = self.node(nUUID=uuid.UUID(e["TO"]))
            self.connectNodes(fromNode, toNode)
        
        # Group loads
        for g in snapshotDict["GROUPS"]:
            self.nodeGroupDict[g["NAME"]] = set([self.node(nUUID=uuid.UUID(ns)) for ns in g["NODES"]])
Transfers the given JSON snapshot into the current dict.
dataset/ETHPy150Open andrew-gardner/dependsworkflow/depends/depends_dag.py/DAG.restoreSnapshot