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: in_memory_state.rs
    path of file: ./repos/akula/src/state
    
    the code of the file until where you have to start completion: use crate::{
    crypto::*,
    models::*,
    trie::{unpack_nibbles, HashBuilder},
    util::*,
    BlockReader, HeaderReader, StateReader, StateWriter,
};
use bytes::{Bytes, BytesMut};
use std::{collections::*, convert::TryInto};

// address -> initial value
type AccountChanges = HashMap<Address
    
    pub fn state_root_hash(&self) -> H256 {
        if self.accounts.is_empty() {
            return EMPTY_ROOT;
        }

        let mut hb = HashBuilder::<'static>::new(None);
        let sorted_accounts = self
            .accounts
            .iter()
            .map(|(&address, account)| {
                let storage_root = self.account_storage_root(address);
                let account = account.to_rlp(storage_root);
                (keccak256(address), account)
            })
            .collect::<BTreeMap<_, _>>();

        for (address, account) in sorted_accounts {
            hb.add_leaf(
                unpack_nibbles(&address.0),
                &fastrlp::encode_fixed_size(&account),
            );
        }

        hb.compute_root_hash()
    }