)
      .attr("stroke", "#999")
      .attr("stroke-width", 2);
    link = linkEnter.merge(link);

    // Update nodes in nodesGroup
    node = nodesGroup.selectAll(".node").data(nodes, d => d.id);
    node.exit().remove();
    const nodeEnter = node
      .enter().append("g")
      .attr("class", "node")
      .call(drag(simulation));

    // Add rounded rectangle (pill) to node
    nodeEnter.append("rect")
      .attr("x", d => -d.label.length * 4 - 10)
      .attr("y", -12)
      .attr("width", d => d.la