human
I wrote the below code

    ax = get_ax()
    ax._selections_count = 0
    def onselect(vertices):
        ax._selections_count += 1
        ax._current_result = vertices
    tool = widgets.PolygonSelector(ax, onselect)
    for (etype, event_args) in event_sequence:
        do_event(tool, etype, **event_args)
    assert (ax._selections_count == selections_count)
    assert (ax._current_result == expected_result)

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

def check_polygon_selector(event_sequence, expected_result, selections_count):