def write_events(self, events):
        """ Save events.

        Args:
            state_change_identifier: Id of the state change that generate these events.
            events: List of Event objects.
        """
        with self.write_lock, self.conn:
            self.conn.executemany(
                'INSERT INTO state_events('
                '   identifier, source_statechange_id, log_time, data'
                ') VALUES(?, ?, ?, ?)',
                events,
            )
def write_events ( self , events ) : with self . write_lock , self . conn : self . conn . executemany ( 'INSERT INTO state_events(' '   identifier, source_statechange_id, log_time, data' ') VALUES(?, ?, ?, ?)' , events , )
Save events.

        Args:
            state_change_identifier: Id of the state change that generate these events.
            events: List of Event objects.