Divergence in lattices in semisimple Lie groups and graphs of groups