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: wgsl.rs
    path of file: ./repos/ruffle/render/naga-agal/tests
    
    the code of the file until where you have to start completion: use naga::{
    valid::{Capabilities, ValidationFlags, Validator},
    Module,
};
use naga_agal::{agal_to_naga, VertexAttributeFormat};

pub fn to_wgsl(module: &Module) -> String {
    let mut out = String::new();

    let mut validator = Validator::new(ValidationFlags::all(), Capabilities::all());
    let module_info = validator
        .validate(module)
        .unwrap_or_else(|e| panic!("Validation failed: {e}"));

    let mut writer =
        naga::back::wgsl::Writer::new(&mut out, 
    
fn test_complex_raytrace() {
    const RAYTRACE_VERTEX: &[u8] = include!("raytrace_vertex.agal");
    const RAYTRACE_FRAGMENT: &[u8] = include!("raytrace_fragment.agal");

    test_shader!(
        RAYTRACE_VERTEX,
        &[
            Some(VertexAttributeFormat::Float4),
            None,
            None,
            None,
            None,
            None,
            None,
            None
        ],
        ShaderType::Vertex
    );

    test_shader!(
        RAYTRACE_FRAGMENT,
        &[None, None, None, None, None, None, None, None],
        ShaderType::Fragment
    );
}