def invert_tree(node):
    """
    Swap the left with the right subtree to invert the binary tree
    """
    if node is None:
        return node

    node.left = invert_tree(node.left)
    node.right = invert_tree(node.right)

    node.left, node.right = node.right, node.left

    return node