code: def compute_node_positions(self):
          
          xs = [0] * len(self.nodes)
          ys = [0] * len(self.nodes)
          for i, _ in enumerate(self.nodes[1:], start=1):
              prev_r = self.node_sizes[i - 1] / 2
              curr_r = self.node_sizes[i] / 2
              xs[i] = xs[i - 1] + prev_r + curr_r
  
          self.node_coords = {"x": xs, "y": ys}
docs: Computes nodes positions.
  
          Arranges nodes in a line starting at (x,y) = (0,0). Node radius is
          assumed to be equal to 0.5 units. Nodes are placed at integer
          locations.