function findMarker(tree, marker, maxDepth = 20) {
    const rootPath = []
    const queue = [rootPath]
    while (queue.length > 0) {
        const currentPath = queue.shift()
        if (currentPath.length > maxDepth) {
            continue
        }
        const currentObj = getIn(tree, currentPath)
        if (currentObj) {
            if (currentObj[marker]) {
                return currentPath
            }
            queue.push(...keys(currentObj).map(k => currentPath.concat(k)))
        }
    }
    return false
}
An implementation of breadth-first search. Looks for marker key in the tree.
@param tree
@param marker
@param [maxDepth]
@returns {*}