def test_brute():
    inc = lambda x: x+1
    dec = lambda x: x-1
    square = lambda x: x**2
    tree = ([inc, dec], square)
    fn = brute(tree, lambda x: -x)

    assert fn(2) == (2 + 1)**2
    assert fn(-2) == (1 - -2)**2

    assert brute(inc)(1) == 2
dataset/ETHPy150Open sympy/sympy/sympy/strategies/tests/test_tree.py/test_brute/swapped operands of `-`