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: testutils.rs
    path of file: ./repos/stdweb/stdweb-internal-macros/src
    
    the code of the file until where you have to start completion: use proc_macro2;
use quote::ToTokens;

#[cfg(test)]
pub fn rust_pretty_p
    
pub fn rust_pretty_print( code: &proc_macro2::TokenStream ) -> String {
    use std::process::{Command, Stdio};
    use std::mem;
    use std::io::{Read, Write};

    let mut cmd = Command::new( "rustfmt" );
    cmd.arg( "--version" );
    let has_rustfmt = cmd.output().map( |output| output.status.success() ).unwrap_or( false );
    if !has_rustfmt {
        return format!( "{}", code );
    }

    let mut cmd = Command::new( "rustfmt" );
    cmd.stdin( Stdio::piped() );
    cmd.stdout( Stdio::piped() );
    cmd.stderr( Stdio::null() );
    let mut child = cmd.spawn().expect( "cannot spawn rustfmt" );
    let mut stdin = child.stdin.take().unwrap();
    write!( stdin, "{}", code ).unwrap();
    mem::drop( stdin );

    let mut pretty_code = String::new();
    let mut stdout = child.stdout.take().unwrap();
    stdout.read_to_string( &mut pretty_code ).unwrap();
    child.wait().expect( "rustfmt failed" );

    pretty_code
}