Convergence of Generalized Belief Propagation Algorithm on Graphs with Motifs