Convert List<Node> into dependencies