Prepared code to create a common message passing graph base class for clique tree and loopy bp inference