function getVisibleNodeInfoAtIndex({
  treeData,
  index: targetIndex,
  getNodeKey,
}) {
  if (!treeData || treeData.length < 1) {
    return null;
  }

  // Call the tree traversal with a pseudo-root node
  const result = getNodeDataAtTreeIndexOrNextIndex({
    targetIndex,
    getNodeKey,
    node: {
      children: treeData,
      expanded: true,
    },
    currentIndex: -1,
    path: [],
    lowerSiblingCounts: [],
    isPseudoRoot: true,
  });

  if (result.node) {
    return result;
  }

  return null;
}
Get the <targetIndex>th visible node in the tree data.

@param {!Object[]} treeData - Tree data
@param {!number} targetIndex - The index of the node to search for
@param {!function} getNodeKey - Function to get the key from the nodeData and tree index

@return {{
     node: Object,
     path: []string|[]number,
     lowerSiblingCounts: []number
 }|null} node - The node at targetIndex, or null if not found