function CPT = cond_dist_noisyfn(bnode, bnet)
% COND_NOISYFN Compute Pr(self | observed parents) for a noisyfn node.
% CPT = cond_noisyfn(bnode, bnet)

%assert(subset(bnode.parents, bnet.observed_nodes));

parent_vals = bnet.values(bnode.parents);
np = length(bnode.parents);
index = mk_multi_index(np+1, 1:np, parent_vals); % child index is free
ns = bnet.node_sizes;
CPT = mk_CPT_from_noisyfn(bnode.pfail, bnode.fn, bnode.self_size);
CPT = CPT(index{:});
