It can be derived from https://github.com/JuliaSmoothOptimizers/NLPModelsTest.jl/blob/f455d358cd20670bd580d3d097917263015f8743/src/dercheck.jl#L43