<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def handle_state_change(self, state_change: StateChange) -> List[Greenlet]: """ Dispatch the state change and return the processing threads. Use this for error reporting, failures in the returned greenlets, should be re-raised using `gevent.joinall` with `raise_error=True`. """

        assert self.wal, f'WAL not restored. node:{self!r}'
        log.debug(
            'State change',
            node=pex(self.address),
            state_change=_redact_secret(serialize.JSONSerializer.serialize(state_change)),
        )

        old_state = views.state_from_raiden(self)

        raiden_event_list = self.wal.log_and_dispatch(state_change)

        current_state = views.state_from_raiden(self)
        for changed_balance_proof in views.detect_balance_proof_change(old_state, current_state):
            update_services_from_balance_proof(self, current_state, changed_balance_proof)

        log.debug(
            'Raiden events',
            node=pex(self.address),
            raiden_events=[
                _redact_secret(serialize.JSONSerializer.serialize(event))
                for event in raiden_event_list
            ],
        )

        greenlets: List[Greenlet] = list()
        if self.ready_to_process_events:
            for raiden_event in raiden_event_list:
                greenlets.append(
                    self.handle_event(raiden_event=raiden_event),
                )

            state_changes_count = self.wal.storage.count_state_changes()
            new_snapshot_group = (
                state_changes_count // SNAPSHOT_STATE_CHANGES_COUNT
            )
            if new_snapshot_group > self.snapshot_group:
                log.debug('Storing snapshot', snapshot_id=new_snapshot_group)
                self.wal.snapshot()
                self.snapshot_group = new_snapshot_group

        return greenlets