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: file_parse_test.rs
    path of file: ./repos/snarkVM/synthesizer/tests/utilities/tests
    
    the code of the file until where you have to start completion: // Copyright (C) 2019-2023 Aleo Systems Inc.
// This file is part of the snarkVM library.

// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
// http://www.apache.org/licenses/LICENSE-2.0

// Unless required by applicable law or agreed to in writing, software
// distribute
    
    fn load<P: AsRef<Path>>(test_path: P, expectation_dir: P) -> Self {
        // Read the contents of the test file.
        let test_string = std::fs::read_to_string(&test_path).expect("Failed to read test file.");
        // Check if the expectation file should be rewritten.
        let rewrite = std::env::var("REWRITE_EXPECTATIONS").is_ok();
        // Construct the path the expectation file.
        let expectation_path = get_expectation_path(&test_path, &expectation_dir);
        // If the expectation file should be rewritten, then there is no need to read the expectation file.
        let expectation = match rewrite {
            true => String::new(),
            false => std::fs::read_to_string(&expectation_path).expect("Failed to read expectation file."),
        };
        Self { test_string, expectation, expectation_path, rewrite }
    }