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: bayes_update_params.m
    path of file: ./repos/bnt/BNT/learning
    
    the code of the file until where you have to start completion: function bnet = bayes_update_params(bnet, cases, clamped)

    
function bnet = bayes_update_params(bnet, cases, clamped)
% BAYES_UPDATE_PARAMS Bayesian parameter updating given completely observed data
% bnet = bayes_update_params(bnet, cases, clamped)
%
% If there is a missing data, you must use EM.
% cases(i,m) is the value assigned to node i in case m (this can also be a cell array).
% clamped(i,m) = 1 if node i was set by intervention in case m (default: clamped = zeros).
% Clamped nodes are not updated.
% If there is a single case, clamped is a list of the clamped nodes, not a bit vector.


%if iscell(cases), usecell = 1; else usecell = 0; end