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: helpers.rs
    path of file: ./repos/steamlocate-rs/src/tests
    
    the code of the file until where you have to start completion: //! Some test helpers for setting up isolated dummy steam installations.

// TODO: add a test with an env var flag that runs against your real local steam installation?

use std::{
    collections::BTreeMap,
    convert::{TryFrom, TryInto},
    fs, iter,
    path::{Path, PathBuf},
};

use crate::{
    tests::{temp::TempDir, TestError},
    SteamDir,
};

use serde::Serialize;

pub fn expect_test_env() -> TempSteamDir {
    TempSteamDir::builder()
        .app(SampleApp::GarrysMod.into())
        .app(SampleApp::Warframe.into())
        .library(SampleApp::GraveyardKeeper.try_into().unwrap())
 
    
    fn finish(self) -> Result<TempLibrary, TestError> {
        let tmp = TempDir::new()?;
        let root_dir = tmp.path().join("test-library");
        let apps_dir = root_dir.join("steamapps");
        fs::create_dir_all(&apps_dir)?;

        let meta_path = apps_dir.join("libraryfolder.vdf");
        fs::write(
            meta_path,
            include_str!("../../tests/assets/libraryfolder.vdf"),
        )?;

        setup_steamapps_dir(&apps_dir, &self.apps)?;
        let apps = self.apps.iter().map(|app| (app.id, 0)).collect();

        Ok(TempLibrary {
            content_id: 1234,
            path: root_dir,
            apps,
            _tmp: tmp,
        })
    }