pruneNodes function

pruneNodes: a fuction for clasical pruning in bayesian networks.