You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: sao_trust.m
    path of file: ./repos/NASTRAN_CoFE/examples/canfield_slp_sqp/private
    
    the code of the file until where you have to start completion: function [x,f,Converged,output,lambda]=sao_trust(Problem,Fun,Grd,...
                                                 TR,options,varargin)
% Sequential Approximate Optimization (SAO) with a Trust Region Strat
    
function minimization')
         disp('_ Trust Radius set by target Trust Ratio')
      end
      if TR.filter.flag || TR.adapt
         disp('f/g/m Objective/Constraint/Merit governs Trust Ratio')
      end
   end
end
if TR.stat<0 && ~Converged
   warning('sao_trust:linprog',out.message)
end
if KKT || KTO
   Converged=1;
elseif Slowed
   Converged=2;
elseif Iter>=options.MaxIter
   Converged=0;
else
   Converged=-1;
end
%  ------------------------------------------------------------------------



%% Nested internal sub-functions
   function [f,g,h,mcon,mc] = FunEval( x ) % function evaluation wrapper
      if UserKnowsActive % reset fun to use current active set
         fun = @(x) Fun(xshape(x),active,varargin{:});
      end