Title: A general approach to the construction of model diagnostics based upon the lagrange multiplier principle