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: cli.rs
    path of file: ./repos/dfir-toolkit/src/bin/evtxanalyze
    
    the code of the file until where you have to start completion: use std::{io::stdout, path::PathBuf};

use clap::{Parser, Subcommand, ValueEnum};
use dfir_toolkit::common::HasVerboseFlag;
use log::LevelFilter;

use super::sessions::SessionStore;

#[derive(ValueEnum, Clone)]
pub enum Format {
    Json,
    Markdown,
    Csv,

    #[clap(name = "latex")]
    LaTeX,

    Dot,
}

#[derive(Subcommand)]
pub enum Command {
    /// generate a process tree
    #[clap(name = "pstree")]
    PsTree {
        /// display only processes of this user (case insensitive regex search)
        #[clap(short('U'), long("username"))]
        username: Option<String>,

        /// Name of the evtx file to parse
        evtx_file: PathBuf,

        /// output format
        #[clap(short('F'), long("format"), value_enum, default_value_t=Format::Csv)]
        format: Format,
    },

    /// d
    
    pub fn display_single_session(&self) -> anyhow::Result<()> {
        match &self.command {
            Command::Session {
                evtx_files_dir,
                session_id,
            } => {
                let sessions = SessionStore::import(evtx_files_dir, true)?;
                match sessions.find_session(session_id) {
                    None => log::error!("no value found for session id {session_id}"),
                    Some(session) => {
                        let mut csv_writer = csv::Writer::from_writer(stdout());
                        for event in session.iter_events() {
                            event.to_csv(&mut csv_writer)?;
                        }
                        csv_writer.flush()?;
                    }
                }
                Ok(())
            }

            _ => unreachable!(),
        }
    }