code: private void calcProductAtVar(int v, VarTensor prod, int excl1, int excl2) {
          for (int nb=0; nb<bg.numNbsT1(v); nb++) {
              if (nb == excl1 || nb == excl2) {
                  // Don't include messages to these neighbors.
                  continue;
              }
              // Get message from neighbor to this node.
              VarTensor nbMsg = msgs[bg.opposingT1(v, nb)];
              // Since the node is a variable, this is an element-wise product. 
              prod.elemMultiply(nbMsg);
          }
      }
docs: Computes the product of all messages being sent to a node, optionally excluding messages sent
  from another node or two.
  
  Upon completion, prod will be multiplied by the product of all incoming messages to node,
  except for the message from exclNode1 / exclNode2 if specified.
  
  @param node The node to which all the messages are being sent.
  @param prod An input / output tensor with which the product will (destructively) be taken.
  @param exclNode1 If non-null, any message sent from exclNode1 to node will be excluded from
  the product.
  @param exclNode2 If non-null, any message sent from exclNode2 to node will be excluded from
  the product.