def from_preorder(arr: list) -> dict:
    """
    Convert a depth-first pre-order array to binary tree, returning the root node.
    """
    node = {}
    size = len(arr)
    if size > 0 and arr[0] is not None:
        node['value'] = arr[0]
        half = (size // 2) + 1
        if half > 1:
            half_1st = from_preorder(arr[1:half])
            if half_1st:
                node['left'] = half_1st
        if half < size:
            half_2nd = from_preorder(arr[half:size])
            if half_2nd:
                node['right'] = half_2nd
    return node