https://github.com/jump-dev/MathOptInterface.jl/blob/master/src/Bridges/Constraint/function_conversion.jl