human
I wrote the below code

    def evts(a, b, c, d, e, f=None):
        out = [[269, a, b], [281, b, c], [1552, c, d], [1564, d, e]]
        if (f is not None):
            out.append([2000, e, f])
        return out
    raw = read_raw_kit(sqd_path)
    assert_array_equal(find_events(raw, output='step', consecutive=True), evts(255, 254, 255, 254, 255, 0))
    raw = read_raw_kit(sqd_path, slope='+')
    assert_array_equal(find_events(raw, output='step', consecutive=True), evts(0, 1, 0, 1, 0))
    raw = read_raw_kit(sqd_path, stim='<', slope='+')
    assert_array_equal(find_events(raw, output='step', consecutive=True), evts(0, 128, 0, 128, 0))
    raw = read_raw_kit(sqd_path, stim='<', slope='+', stim_code='channel')
    assert_array_equal(find_events(raw, output='step', consecutive=True), evts(0, 160, 0, 160, 0))
    raw = read_raw_kit(sqd_path, stim=range(160, 162), slope='+', stim_code='channel')
    assert_array_equal(find_events(raw, output='step', consecutive=True), evts(0, 160, 0, 160, 0))

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

def test_raw_events():