Wrappers for LMS codegen in v4.