def shakeNodes(self, dagNodesToShake):
        nodesAffected = list()
        preSnap = self.dag.snapshot(nodeMetaDict=self.graphicsScene.nodeMetaDict(), connectionMetaDict=self.graphicsScene.connectionMetaDict())

        for dagNode in dagNodesToShake:
            inNodes = self.dag.nodeConnectionsIn(dagNode)
            outNodes = self.dag.nodeConnectionsOut(dagNode)
            drawNode = self.graphicsScene.drawNode(dagNode)
            
            # Connect all previous dag nodes to all next nodes & add the draw edges
            for inputDagNode in inNodes:
                inputDrawNode = self.graphicsScene.drawNode(inputDagNode)
                for outputDagNode in outNodes:
                    outputDrawNode = self.graphicsScene.drawNode(outputDagNode)
                    self.dag.connectNodes(inputDagNode, outputDagNode)
                    newDrawEdge = self.graphicsScene.addExistingConnection(inputDagNode, outputDagNode)
                    newDrawEdge.horizontalConnectionOffset = self.graphicsScene.drawEdge(drawNode, outputDrawNode).horizontalConnectionOffset
                    newDrawEdge.adjust()
            
            # Disconnect this dag node from everything
            for inputDagNode in inNodes:
                self.dag.disconnectNodes(inputDagNode, dagNode)
            for outputDagNode in outNodes:
                nodesAffected = nodesAffected + self.dagNodeDisconnected(dagNode)
                self.dag.disconnectNodes(dagNode, outputDagNode)

            # Remove all draw edges
            for edge in drawNode.drawEdges():
                edge.sourceDrawNode().removeDrawEdge(edge)
                edge.destDrawNode().removeDrawEdge(edge)
                self.graphicsScene.removeItem(edge)
                
            # Nullify all our inputs
            for input in dagNode.inputs():
                dagNode.setInputValue(input.name, "")

        currentSnap = self.dag.snapshot(nodeMetaDict=self.graphicsScene.nodeMetaDict(), connectionMetaDict=self.graphicsScene.connectionMetaDict())
        self.undoStack.push(depends_undo_commands.DagAndSceneUndoCommand(preSnap, currentSnap, self.dag, self.graphicsScene))

        # A few refreshes
        self.propWidget.refresh()
        self.updateScenegraph(self.selectedDagNodes())
        self.graphicsScene.refreshDrawNodes(nodesAffected)
Returns the TreeItem model, set for the project.
dataset/ETHPy150Open andrew-gardner/dependsworkflow/depends/depends_main_window.py/MainWindow.shakeNodes--crossover with--dataset/ETHPy150Open idlesign/django-sitetree/sitetree/utils.py/get_tree_item_model