human
I wrote the below code

    operators = {u'+': operator.add, u'-': operator.sub, u'*': operator.mul, u'/': operator.truediv, u'**': operator.pow}
    tree = ET(u'+', ET(1.0), ET(u'-', ET(2.0), ET(u'*', ET(3.0), ET(u'/', ET(4.0), ET(u'**', ET(5.0), ET(6.0))))))
    def test_slice(start, stop, expected):
        assert np.allclose(tree.evaluate(operators, start=start, stop=stop), expected)
    assert (tree.evaluate(operators) == ((1.0 + 2.0) - ((3.0 * 4.0) / (5.0 ** 6.0))))
    test_slice(0, 5, ((1.0 + 2.0) - ((3.0 * 4.0) / 5.0)))
    test_slice(0, 4, ((1.0 + 2.0) - (3.0 * 4.0)))
    test_slice(0, 3, ((1.0 + 2.0) - 3.0))
    test_slice(0, 2, (1.0 + 2.0))
    test_slice(0, 1, 1.0)
    test_slice(1, 6, (2.0 - ((3.0 * 4.0) / (5.0 ** 6.0))))
    test_slice(1, 5, (2.0 - ((3.0 * 4.0) / 5.0)))
    test_slice(1, 4, (2.0 - (3.0 * 4.0)))
    test_slice(1, 3, (2.0 - 3.0))
    test_slice(1, 2, 2.0)
    test_slice(2, 6, ((3.0 * 4.0) / (5.0 ** 6.0)))
    test_slice(2, 5, ((3.0 * 4.0) / 5.0))
    test_slice(2, 4, (3.0 * 4.0))
    test_slice(2, 3, 3.0)
    test_slice(3, 6, (4.0 / (5.0 ** 6.0)))
    test_slice(3, 5, (4.0 / 5.0))
    test_slice(3, 4, 4.0)
    test_slice(4, 6, (5.0 ** 6.0))
    test_slice(4, 5, 5.0)
    test_slice(5, 6, 6.0)

What's a good function header?

Here's a good function header?
assistant
#Here's a good function header.

def test_tree_evaluate_subexpression():