pub fn preprocess_code(code: &str) -> String
Preprocess code: trim leading and trailing whitespaces around the code, remove trailing whitespaces from each line.