Changing DD/AD3/Bethe-ADMM (in graphical models toolkit) to factor graph architecture