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: keygen.rs
    path of file: ./repos/holochain-rust/crates/cli/src/cli
    
    the code of the file until where you have to start completion: use error::DefaultResult;
use holochain_common::paths::keys_directory;
use holochain_conductor_lib::{key_loaders::mock_passphrase_manager, keystore::Keystore};
use rpassword;
use std::{
    fs::create_dir_all,
    io::{self, Write},
    path::PathBuf,
};

#[holochain_tracing_macros::newrelic_autotrace(HOLOCHAIN_CLI)]
pub fn keygen(path: Option<PathBuf>, passphrase: Option<String>, quiet: bool) -> DefaultResult<()> {
    let passphrase = passph
    
    fn keygen_roundtrip() {
        let path = PathBuf::new().join("test.key");
        let passphrase = String::from("secret");

        keygen(Some(path.clone()), Some(passphrase.clone()), true).expect("Keygen should work");

        let mut keystore =
            Keystore::new_from_file(path.clone(), mock_passphrase_manager(passphrase), None)
                .unwrap();

        let keybundle = keystore.get_keybundle(PRIMARY_KEYBUNDLE_ID);

        assert!(keybundle.is_ok());

        let _ = remove_file(path);
    }