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: mod.rs
    path of file: ./repos/firecracker/src/vmm/src/cpu_config/x86_64
    
    the code of the file until where you have to start completion: // Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

/// Module for CPUID instruction related content
pub mod cpuid;
/// Module for custom CPU templates
pub mod custom_cpu_template;
/// Module for static CPU templates
pub mod static_cpu_templates;
/// Module with test utils for custom CPU templates
pub mod test_utils;

use std::collections::HashMap;

use self::custom_cpu_template::CpuidRegister;
use super::templates::CustomCpuTemplate;
use crate::cpu_config::x86_64::cpuid::{Cpuid, CpuidKey};

/// Errors thrown while configuring templates.
#[derive(Debug, PartialEq, Eq, thiserror::Er
    
    fn test_invalid_template() {
        // Test CPUID validation
        let host_configuration = empty_cpu_config();
        let guest_template = build_test_template();
        let cpu_config_result = host_configuration.apply_template(&guest_template);
        assert!(
            cpu_config_result.is_err(),
            "Expected an error as template should have failed to modify a CPUID entry that is not \
             supported by host configuration",
        );
        assert_eq!(
            cpu_config_result.unwrap_err(),
            CpuConfigurationError::CpuidFeatureNotSupported(
                guest_template.cpuid_modifiers[0].leaf,
                guest_template.cpuid_modifiers[0].subleaf
            )
        );

        // Test MSR validation
        let host_configuration = unsupported_cpu_config();
        let guest_template = build_test_template();
        let cpu_config_result = host_configuration.apply_template(&guest_template);
        assert!(
            cpu_config_result.is_err(),
            "Expected an error as template should have failed to modify an MSR value that is not \
             supported by host configuration",
        );
        assert_eq!(
            cpu_config_result.unwrap_err(),
            CpuConfigurationError::MsrNotSupported(guest_template.msr_modifiers[0].addr)
        )
    }