def find_focusable(node):
    """
    Search for the first focusable window within the node tree
    """

    if not node.children:
        return node

    if node.focus:
        return find_focusable(node.children_dict[node.focus[0]])