I don't think that random_state is documented. Anyhow, it should be a more versatile input type, and accept also anything that can be a seed. For this, you need to rely on check_random_state from scikit-learn.

Also, your current implementation has a mutable in its function definition. I don't think that it works as you expect: if you call it twice in the same Python function, it won't give the same result.