Randomize an undirected network rewiring the links but preserving the degree sequence