pub fn with_shared_interpreter<T, F>(f: F) -> Option<T>where F: FnOnce(&SharedInterpreterState) -> T,