docs: function makeGroups(scope, nodes) {
      var children = parse.children;
      var groupBy = parse.groupBy;
      var groups = {};
      var group;
      var node;
  
      for (var i = 0, len = nodes.length; i < len; i++) {
        node = nodes[i];
        group = node[groupBy];
  
        if (!groups[group]) {
          groups[group] = {};
          groups[group][children] = [node];
          groups[group][groupBy] = group;
        }
        else {
          groups[group][children].push(node);
        }
      }
  
      groups = Object.keys(groups)
      .map(function(group) { return groups[group]; });
  
      for (i = 0, len = groups.length; i < len; i++) {
        group = groups[i];
  
        if (scope.nodes.some(pushTo(group))) continue;
  
        scope.nodes.push(group);
      }
    }