function walk({
  treeData,
  getNodeKey,
  callback,
  ignoreCollapsed = true,
}) {
  if (!treeData || treeData.length < 1) {
    return;
  }

  walkDescendants({
    callback,
    getNodeKey,
    ignoreCollapsed,
    isPseudoRoot: true,
    node: { children: treeData },
    currentIndex: -1,
    path: [],
    lowerSiblingCounts: [],
  });
}
Walk descendants depth-first and call a callback on each

@param {!Object[]} treeData - Tree data
@param {!function} getNodeKey - Function to get the key from the nodeData and tree index
@param {function} callback - Function to call on each node
@param {boolean=} ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`

@return void