function ll = log_likelihood_noisyfn(bnode)
% LOG_LIKELIHOOD_NOISYFN Compute the contribution to the total expected log-likelihood of a noisyfn node.
% ll = log_likelihood_noisyfn(bnode)

CPT = mk_CPT_from_noisyfn(bnode.pfail, bnode.fn, bnode.self_size);
tiny = exp(-700);
ll = log(CPT(:)  + tiny)' * bnode.counts(:); % CPT(i) = 0 iff counts(i) = 0
