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: account_hashing.rs
    path of file: ./repos/reth/crates/stages/benches/setup
    
    the code of the file until where you have to start completion: #![allow(unreachable_pub)]

use super::constants;
use reth_db::{
    cursor::DbCursorRO, database::Database, tables, transaction::DbTx, DatabaseError as DbError,
};
use reth_primitives::{fs, stage::StageCheckpoint, BlockNumber};
use reth_stages::{
    stages::{AccountHashingStage, SeedOpts},
    test_utils::TestStageDB,
};
use std::{ops::RangeInclusive, path::Path};

/// Prepares a database for [`AccountHashingStage`]
/// If the env
    
fn generate_testdata_db(num_blocks: u64) -> (TestStageDB, RangeInclusive<BlockNumber>) {
    let opts = SeedOpts { blocks: 0..=num_blocks, accounts: 100_000, txs: 100..150 };

    let path = Path::new(env!("CARGO_MANIFEST_DIR")).join("testdata").join("account-hashing-bench");
    let exists = path.exists();
    let db = TestStageDB::new(&path);

    if !exists {
        // create the dirs
        fs::create_dir_all(&path).unwrap();
        println!("Account Hashing testdata not found, generating to {:?}", path.display());
        let provider = db.factory.provider_rw().unwrap();
        let _accounts = AccountHashingStage::seed(&provider, opts.clone());
        provider.commit().expect("failed to commit");
    }

    (db, opts.blocks)
}