This `seed` parameter is strange, why allowing either an `int` or a `np.random.RandomState` ? (the doc should say `numpy.random.RandomState` not `np.RandomState` by the way). It seems to me that you essentially do `np.random.RandomState(seed)` whatever the value of `seed`. If so, please just simplify this and drop the function `_make_random_gen` along the way.