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: marginal_nodes.m
    path of file: ./repos/bnt/BNT/inference/static/@jtree_limid_inf_engine
    
    the code of the file until where you have to start completion: function [m, pot] = marginal_nodes(engine, query)
% MARGINAL_NODES Compute the marginal on the specified nodes (jtree_limid)

    
function [m, pot] = marginal_nodes(engine, query)
% MARGINAL_NODES Compute the marginal on the specified nodes (jtree_limid)
% [m, pot] = marginal_nodes(engine, query)
%
% query should be a subset of a family of a decision node

if isempty(query)
  bnet = bnet_from_engine(engine);
  d = bnet.decision_nodes(1); % pick an arbitrary decision node
  [dummy, big_pot] = marginal_family(engine, d); 
else
  [dummy, big_pot] = marginal_family(engine, query);
end