findDisconnectedSubGraphs = (root) => {
  // console.log('findDisconnectedSubGraphs')
  if (Array.isArray(root)) {
    root = { children: root, type: 'root' }
  }

  const stack = []
  const leafs = []
  const subTrees = []
  dfs(root, stack, leafs, subTrees)

  // const independentSubtree = root.children
  // console.log('results subTrees', JSON.stringify(subTrees[0]))
  return subTrees[0]
}
finds all the disconnected sub graphs inside of a tree: ie if
the script on which the tree is based returns arrays of data will return those
@param  {} root 'findDisconnectedSubGraphs'