Persistency by Pruning for General Graphical Models