function T = prod_pi_msgs_tabular(bnet, n, except)

ps = parents(bnet.adj_mat, n);
ns = bnet.node_sizes;
fam = [ps n];

if strcmp(bnet.algo, 'cutset')
  pp = parents(bnet.cutset.absorbed_edges, n);
  fam = union(fam, pp);
end

T = mk_table(fam, ns(fam)); % initializes to 1s
for i=1:length(ps)
  p = ps(i);
  if p ~= except
    pi_from_parent = mk_table(p, ns(p));
    pi_from_parent.T = bnet.pearl.msg{n}.pi_from_parent{i};
    T = multiply_by_table(T, pi_from_parent);
  end
end

if strcmp(bnet.algo, 'cutset')
  for i=1:length(pp)
    p = pp(i);
    pi_from_parent = mk_table(p, ns(p));
    pi_from_parent.T = bnet.pearl.phantom_msg{n}.pi_from_parent{i};
    T = multiply_by_table(T, pi_from_parent);
  end  
end
