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: snapshot_tests.rs
    path of file: ./repos/typeshare/core/tests
    
    the code of the file until where you have to start completion: use anyhow::Context;
use once_cell::sync::Lazy;
use std::{
    collections::HashMap,
    env,
    fs::{self, OpenOptions},
    io::Read,
    path::{Path, PathBuf},
};
use typeshare_core::language::Language;

static TESTS_FOLDER_PATH: Lazy<PathBuf> =
    Lazy::new(|| PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("data/te
    
fn load_file(path: impl AsRef<Path>) -> Result<String, anyhow::Error> {
    let path = path.as_ref();

    if path.file_name().is_some() {
        if let Some(parent) = path.parent() {
            fs::create_dir_all(parent)?;
        }
    }

    let mut file = OpenOptions::new()
        .read(true)
        .write(true)
        .create(true)
        .open(path)
        .with_context(|| format!("failed to open file at path {}", path.to_string_lossy()))?;
    let mut contents = String::new();
    file.read_to_string(&mut contents).with_context(|| {
        format!(
            "failed to read from file at path {}",
            path.to_string_lossy()
        )
    })?;

    Ok(contents)
}