The graphical brain: Belief propagation and active inference