Implementing Expectation Propagation on a factor graph.