You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: multi_strategy.rs
    path of file: ./repos/diem/language/testing-infra/e2e-tests/src/execution_strategies
    
    the code of the file until where you have to start completion: // Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0

#![forbid(unsafe_code)]
use crate::execution_strategies::types::{Block, Executor, ExecutorResult};
use diem_types::transaction::TransactionOutput;
use std::{collections::BTreeMap, error::Error, fmt};

#[derive(Debug)]
pub enum MultiResult<E: Error> {
    NonMatchingOutput(TransactionOutput, TransactionOutput),
    OtherResult(E),
}

impl<E: Error> std::fmt::Display for MultiResult<E> {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        match self {
            MultiResult::OtherResult(err) => std::fmt::Display::fmt(&err, f),
            MultiResult::NonMatchingOutput(output1, output2) => {
                write!(f, "{:?} != {:?}", output1, output2)
            }
        }
    }
}

impl<E: Error> Error for MultiResult<E> {
    fn source(&self) -> Option<&(dyn Error + 'static)> {
        match self {
            MultiResult::OtherResult(err) => err.source(
    
    fn execute_block(&mut self, block: Block<Self::Txn>) -> ExecutorResult<Self::BlockResult> {
        let mut results = BTreeMap::new();
        for executor in self.executors.iter_mut() {
            let block = match executor.execute_block(block.clone()) {
                Err(err) => return Err(MultiResult::OtherResult(err)),
                Ok(block) => block,
            };
            for (index, output) in block.into_iter().enumerate() {
                match results.get(&index) {
                    None => {
                        results.insert(index, output);
                    }
                    Some(previous_output) => {
                        if &output != previous_output {
                            return Err(MultiResult::NonMatchingOutput(
                                output,
                                previous_output.clone(),
                            ));
                        }
                    }
                }
            }
        }
        Ok(results.into_iter().map(|(_, v)| v).collect())
    }