The tests in this loop check that the `dtype` of the result is `np.double`, and that using `random_state=4321` gives the same result as `random_state=np.random.RandomState(4321)`.  Those tests don't appear to have anything to do with the density, so I don't think we need to repeat the tests for four different `density` values.