docs: function depthFirst(uniqNodes, edges) {
      var nodeIds = Object.keys(uniqNodes);
      var totalNodes = nodeIds.length;
      debug('Found %d unique nodes: %j', totalNodes, nodeIds);
  
      var sortedNodes = [];
      var markedNodes = {};
  
      var nodeIndex = 0;
      do {
          var currentNode = uniqNodes[nodeIds[nodeIndex]];
  
          if (!markedNodes[currentNode.id()]) {
              visit(currentNode, edges, markedNodes, sortedNodes);
          }
      } while (++nodeIndex < totalNodes);
  
      return sortedNodes;
  }