Return an object capturing the current internal state of the generator. This object can be passed to setstate() to restore the state.
random.getstate()