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: jtree_mnet_inf_engine.m
    path of file: ./repos/bnt/BNT/inference/static/@jtree_mnet_inf_engine
    
    the code of the file until where you have to start completion: function engine = jtree_mnet_inf_engine(model, varargin)
% JTREE_MNET_INF_ENGINE Junction tree inference engine for Markov nets
% engine = jtree_inf_engine(mnet, ...)
%

% set default params
N = length(mnet.graph);
root = N;


    
function engine = jtree_mnet_inf_engine(model, varargin)
% JTREE_MNET_INF_ENGINE Junction tree inference engine for Markov nets
% engine = jtree_inf_engine(mnet, ...)
%

% set default params
N = length(mnet.graph);
root = N;

engine = init_fields;
engine = class(engine, 'jtree_mnet_inf_engine', inf_engine(bnet));

onodes = bnet.observed;
if is_mnet(bnet)
  MG = bnet.graph;
else
  error('should be a mnet')
end