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: wizard.rs
    path of file: ./repos/himalaya/src/config
    
    the code of the file until where you have to start completion: use anyhow::Result;
use dialoguer::{Confirm, Input, Select};
use shellexpand_utils::expand;
use std::{fs, path::PathBuf, process};
use toml_edit::{Document, Item};

use crate::{account, ui::THEME};

use super::TomlConfig;

#[macro_export]
macro_rules! wizard_warn {
    ($($arg:tt)*) => {
	println!("{}", console::style(format!($($arg)*)).yellow().bold());
    };
}

#[macro_export]
macro_rules! wizard_prompt {
    ($($arg:tt)*) => {
	format!("{}", console::style(format!($($arg)*)).italic())
    };
}

#[macro_export]
macro_rules! wizard_log {
    ($($arg:tt)*) => {
	println!();
	println!("{}", console::style(format!($($arg)*)).underlined());
	println!();
    };
}

pub(crate) async fn configure(path: PathBuf) -> Result<TomlConfig> {
    wizard_log!("Configuring your first account:");

    let mut config = TomlConfig::default();

    while let Some((name, account_config)) = account::wizard::configure().await? {
        config.accounts.insert(na
    
    fn pretty_serialize_smtp_oauth2() {
        use email::{
            account::config::oauth2::OAuth2Config,
            smtp::config::{SmtpAuthConfig, SmtpConfig},
        };

        assert_eq(
            TomlAccountConfig {
                email: "test@localhost".into(),
                smtp: Some(SmtpConfig {
                    host: "localhost".into(),
                    port: 143,
                    login: "test@localhost".into(),
                    auth: SmtpAuthConfig::OAuth2(OAuth2Config {
                        client_id: "client-id".into(),
                        auth_url: "auth-url".into(),
                        token_url: "token-url".into(),
                        ..Default::default()
                    }),
                    ..Default::default()
                }),
                ..Default::default()
            },
            r#"[accounts.test]
email = "test@localhost"
smtp.host = "localhost"
smtp.port = 143
smtp.login = "test@localhost"
smtp.oauth2.method = "xoauth2"
smtp.oauth2.client-id = "client-id"
smtp.oauth2.auth-url = "auth-url"
smtp.oauth2.token-url = "token-url"
smtp.oauth2.pkce = false
smtp.oauth2.scopes = []
"#,
        );
    }