Building a symbolic Hessian function with ModelingToolkit.jl

(EDIT) Oops… Yes! Constrained OptimizationSystem.
The goal is to find an effective way to compute the Lagrangian Hessian (preferably symbolically store it as this is a large system).

A very similar description of the problem would be this post. I think the original poster settled with their approach (which works but may not be very efficient). For a system with a large number of parameters, I would prefer to store this Hessian symbolically in a function and provide the Lagrange multiplier (and other parameters) each time we call the function. This is what I attempt doing with ModelingToolkit.jl.