def METHOD_NAME(self, events):
    success = None
    use_aps = None
    algo = None
    waste = None
    change_pos = None
    is_aps = False
    sc_events = []
    for event in events:
        if event.type == 1:
            if not is_aps:
                algo = event.algo.decode()
                waste = event.waste
            sc_events.append(event)
        elif event.type == 2:
            success = event.success
            if not is_aps:
                change_pos = event.change_pos
        elif event.type == 3:
            is_aps = True
        elif event.type == 4:
            assert is_aps
            if event.use_aps:
                use_aps = True
                assert_equal(len(sc_events), 2)
                algo = sc_events[1].algo.decode()
                waste = sc_events[1].waste
                change_pos = event.change_pos
    return success, use_aps, algo, waste, change_pos