Make context.managed function as decorator as well.