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: generate.rs
    path of file: ./repos/turbo/crates/turborepo-lib/src/commands
    
    the code of the file until where you have to start completion: use std::{
    io,
    process::{Command, Stdio},
};

use thiserror::Error;
use tracing::debug;
use turborepo_telemetry::events::command::CommandEventBuilder;
use which::which;

use crate::{
    child::spawn_child,
    cli::{GenerateCommand, GeneratorCustomArgs},
};

#[derive(Debug, Error)]
pub enum Error {
    #[error("Unable to run generate - missing requirements (npx): {0}")]
    NpxNotFound(#[source] which::Error),
    #[error("Failed to run
    
fn call_turbo_gen(command: &str, tag: &String, raw_args: &str) -> Result<i32, Error> {
    debug!(
        "Running @turbo/gen@{} with command `{}` and args {:?}",
        tag, command, raw_args
    );
    let npx_path = which("npx").map_err(Error::NpxNotFound)?;
    let mut npx = Command::new(npx_path);
    npx.arg("--yes")
        .arg(format!("@turbo/gen@{}", tag))
        .arg("raw")
        .arg(command)
        .args(["--json", raw_args])
        .stdout(Stdio::inherit())
        .stderr(Stdio::inherit());

    let child = spawn_child(npx).map_err(Error::NpxFailed)?;
    let exit_code = child.wait().map_err(Error::NpxFailed)?.code().unwrap_or(2);
    Ok(exit_code)
}