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: offline.rs
    path of file: ./repos/nearcore/tools/mirror/src
    
    the code of the file until where you have to start completion: use crate::{ChainError, SourceBlock, SourceChunk};
use anyhow::Context;
use async_trait::async_trait;
use near_chain::types::RuntimeAdapter;
use near_chain::{ChainStore, ChainStoreAccess};
u
    
    pub(crate) fn new<P: AsRef<Path>>(home: P) -> anyhow::Result<Self> {
        let mut config =
            nearcore::config::load_config(home.as_ref(), GenesisValidationMode::UnsafeFast)
                .with_context(|| format!("Error loading config from {:?}", home.as_ref()))?;
        let node_storage =
            nearcore::open_storage(home.as_ref(), &mut config).context("failed opening storage")?;
        let store = node_storage.get_hot_store();
        let chain = ChainStore::new(
            store.clone(),
            config.genesis.config.genesis_height,
            config.client_config.save_trie_changes,
        );
        let epoch_manager = EpochManager::new_arc_handle(store.clone(), &config.genesis.config);
        let runtime =
            NightshadeRuntime::from_config(home.as_ref(), store, &config, epoch_manager.clone());
        Ok(Self { chain, epoch_manager, runtime })
    }