function getNodesToRender({data, height, hideRootNode, width, getSize}) {
  const partitionFunction = partition();
  const structuredInput = hierarchy(data).sum(getSize);
  const radius = Math.min(width, height) / 2 - 10;
  const x = scaleLinear().range([0, 2 * Math.PI]);
  const y = scaleSqrt().range([0, radius]);

  return partitionFunction(structuredInput)
    .descendants()
    .reduce((res, cell, index) => {
      if (hideRootNode && index === 0) {
        return res;
      }

      return res.concat([
        {
          angle0: Math.max(0, Math.min(2 * Math.PI, x(cell.x0))),
          angle: Math.max(0, Math.min(2 * Math.PI, x(cell.x1))),
          radius0: Math.max(0, y(cell.y0)),
          radius: Math.max(0, y(cell.y1)),
          depth: cell.depth,
          parent: cell.parent,
          ...cell.data
        }
      ]);
    }, []);
}
Create the list of nodes to render.
@param {Object} props
   props.data {Object} - tree structured data (each node has a name anc an array of children)
   props.height {number} - the height of the graphic to be rendered
   props.hideRootNode {boolean} - whether or not to hide the root node
   props.width {number} - the width of the graphic to be rendered
   props.getSize {function} - accessor for the size
@returns {Array} Array of nodes.