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: gltf_bytes_converter.rs
    path of file: ./repos/amethyst/amethyst_gltf/src/importer
    
    the code of the file until where you have to start completion: use amethyst_assets::distill_importer::Error;
use gltf::Document;

pub fn convert_bytes(
    bytes: &[u8],
) -> Result<(Document, Vec<gltf::buffer::Data>, Vec<gltf::image::Data>), Error> {
    log::debug!("Starting Gltf import");
    let result = gltf::import_slice(&bytes);
    if let Err(err) = result {
        log::error!("Import error: {:?}", err);
        return Err(Error::Boxed(Box::new(err)));
    }
    Ok(result.unwrap())
}

#[cfg(test)]
mod test {
    
    fn should_import_glb_gltf() {
        let mut f = File::open("test/suzanne.glb").expect("suzanne.glb not found");
        let mut buffer = Vec::new();
        // read the whole file
        f.read_to_end(&mut buffer)
            .expect("read_to_end did not work");
        let gltf_import = convert_bytes(&buffer);
        match gltf_import {
            Ok(gltf) => {
                let doc = gltf.0;
                assert_eq!(2, doc.images().len());
                assert_eq!(1, doc.materials().len());
                assert_eq!(1, doc.meshes().len());
                assert_eq!(1, doc.nodes().len());
                assert_eq!(1, doc.scenes().len());
                assert_eq!(2, doc.textures().len());
            }
            Err(e) => {
                panic!("Error during gltf import {:?}", e);
            }
        }
    }