function pi = prod_CPT_and_pi_msgs_nor(bnet, n, except)

% pi  = prod_i (1 - ci pi(i->n))
% is the product of the endorsement withheld (Pearl p188 eqn 4.57)

global scaled

ps = parents(bnet.adj_mat, n);
pi = 1;
for i=1:length(ps)
  p = ps(i);
  if p ~= except
    assert(bnet.pearl.msg{n}.recvd_pi_from_parent(i));
    pi_from_parent = bnet.pearl.msg{n}.pi_from_parent{i};
    q = bnet.bnodes{n}.inhibit(i+1); % +1 to skip the leak term
    if scaled % so the pi msgs sum to 1
      c = 1-q;
      pi = pi * (1 - c*pi_from_parent(2));
    else
      pi = pi * (q*pi_from_parent(2) + pi_from_parent(1));
    end
  end
end
% The pi msg that a leak node sends to its child is [0 1]
% since its own pi is [0 1] and its lambda to self is [0 1].
q = bnet.bnodes{n}.inhibit(1); % leak term
% 1 - c*pi_from_parent = 1-c*1 = q
pi = pi * q;

