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: gen_decl.rs
    path of file: ./repos/pylyzer/crates/py2erg
    
    the code of the file until where you have to start completion: use std::fs::File;
use std::io::{BufWriter, Write};

use erg_common
    
pub fn dump_decl_er(input: Input, hir: HIR, status: CheckStatus) {
    let decl_gen = DeclFileGenerator::new(&input, status);
    let file = decl_gen.gen_decl_er(hir);
    let mut dir = input.dir();
    dir.push("__pycache__");
    let pycache_dir = dir.as_path();
    let f = File::options()
        .write(true)
        .open(pycache_dir.join(file.filename))
        .unwrap();
    let mut f = BufWriter::new(f);
    f.write_all(file.code.as_bytes()).unwrap();
}