'Initialize execution context for a Compiled construct.'

@classmethod
def _init_compiled(cls, dialect, connection, dbapi_connection, compiled, parameters):

    self = cls.__new__(cls)
    self.dialect = dialect
    self.root_connection = connection
    self._dbapi_connection = dbapi_connection
    self.engine = connection.engine
    self.compiled = compiled
    if (not compiled.can_execute):
        raise exc.ArgumentError('Not    an    executable    clause')
    self.execution_options = compiled.statement._execution_options
    if connection._execution_options:
        self.execution_options = dict(self.execution_options)
        self.execution_options.update(connection._execution_options)
    self.result_map = compiled.result_map
    self.unicode_statement = util.text_type(compiled)
    if (not dialect.supports_unicode_statements):
        self.statement = self.unicode_statement.encode(self.dialect.encoding)
    else:
        self.statement = self.unicode_statement
    self.isinsert = compiled.isinsert
    self.isupdate = compiled.isupdate
    self.isdelete = compiled.isdelete
    if (self.isinsert or self.isupdate or self.isdelete):
        self._is_explicit_returning = bool(compiled.statement._returning)
        self._is_implicit_returning = bool((compiled.returning and (not compiled.statement._returning)))
    if (not parameters):
        self.compiled_parameters = [compiled.construct_params()]
    else:
        self.compiled_parameters = [compiled.construct_params(m, _group_number=grp) for (grp, m) in enumerate(parameters)]
        self.executemany = (len(parameters) > 1)
    self.cursor = self.create_cursor()
    if (self.isinsert or self.isupdate):
        self.postfetch_cols = self.compiled.postfetch
        self.prefetch_cols = self.compiled.prefetch
        self.returning_cols = self.compiled.returning
        self.__process_defaults()
    processors = compiled._bind_processors
    parameters = []
    if dialect.positional:
        for compiled_params in self.compiled_parameters:
            param = []
            for key in self.compiled.positiontup:
                if (key in processors):
                    param.append(processors[key](compiled_params[key]))
                else:
                    param.append(compiled_params[key])
            parameters.append(dialect.execute_sequence_format(param))
    else:
        encode = (not dialect.supports_unicode_statements)
        for compiled_params in self.compiled_parameters:
            param = {}
            if encode:
                for key in compiled_params:
                    if (key in processors):
                        param[dialect._encoder(key)[0]] = processors[key](compiled_params[key])
                    else:
                        param[dialect._encoder(key)[0]] = compiled_params[key]
            else:
                for key in compiled_params:
                    if (key in processors):
                        param[key] = processors[key](compiled_params[key])
                    else:
                        param[key] = compiled_params[key]
            parameters.append(param)
    self.parameters = dialect.execute_sequence_format(parameters)
    return self
