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: calc_mpe_dbn.m
    path of file: ./repos/bnt/BNT/general/Old
    
    the code of the file until where you have to start completion: function [mpe, ll] = calc_mpe_dbn(engine, evidence, break_ties)
% CALC_MPE Computes the most probable explanation of the evidence
% [mpe, ll] = calc_mpe_dbn(engine, evidence, break_ties)
%

    
function [mpe, ll] = calc_mpe_dbn(engine, evidence, break_ties)
% CALC_MPE Computes the most probable explanation of the evidence
% [mpe, ll] = calc_mpe_dbn(engine, evidence, break_ties)
%
% INPUT
% engine must support max-propagation
% evidence{i,t} is the observed value of node i in slice t, or [] if hidden
%
% OUTPUT
% mpe{i,t} is the most likely value of node i (cell array!)
% ll is the log-likelihood of the globally best assignment
%
% This currently only works when all hidden nodes are discrete

if nargin < 3, break_ties = 0; end