auto generated mono wrapping code