@classmethod
    def _init_statement(cls, dialect, connection, dbapi_connection,
                        statement, parameters):

        self = cls.__new__(cls)
        self.dialect = dialect
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.engine = connection.engine

        # plain text statement
        self.execution_options = connection._execution_options

        if not parameters:
            if self.dialect.positional:
                self.parameters = [dialect.execute_sequence_format()]
            else:
                self.parameters = [{}]
        elif isinstance(parameters[0], dialect.execute_sequence_format):
            self.parameters = parameters
        elif isinstance(parameters[0], dict):
            if dialect.supports_unicode_statements:
                self.parameters = parameters
            else:
                self.parameters = [
                    dict((dialect._encoder(k)[0], d[k]) for k in d)
                    for d in parameters
                ] or [{}]
        else:
            self.parameters = [dialect.execute_sequence_format(p)
                               for p in parameters]

        self.executemany = len(parameters) > 1

        if not dialect.supports_unicode_statements and \
                isinstance(statement, util.text_type):
            self.unicode_statement = statement
            self.statement = dialect._encoder(statement)[0]
        else:
            self.statement = self.unicode_statement = statement

        self.cursor = self.create_cursor()
        return self
Takes in an event from the client to server side, that has already
dataset/ETHPy150Open RoseOu/flasky/venv/lib/python2.7/site-packages/sqlalchemy/engine/default.py/DefaultExecutionContext._init_statement--crossover with--dataset/ETHPy150Open matrix-org/synapse/synapse/handlers/federation.py/FederationHandler.handle_new_event