t parentIndex = lastLevel[Math.floor(Math.random() * lastLevelLen)];
      model.edges[edgeIndex] = {
        from: parentIndex,
        to: n
      };
      edgeIndex++;

      if (j === 0) {
        group = 0;
      }
      else if (j === 1) {
        group = groupIndex++;
      }
      else {
        group = nodeGroups[parentIndex];
      }

      model.nodes[n] = {
        group: group,
        label: n
      };
      nodeGroups[n] = group;
      levels[j].push(n);
      n++;
    }
  }
}

let graph = ne