def seed_random_state(seed):
    if (seed is None) or (isinstance(seed, int)):
        return np.random.RandomState(seed)
    elif isinstance(seed, np.random.RandomState):
        return seed
    raise ValueError("%r can not be used to generate numpy.random.RandomState"
                     " instance" % seed)
Turn seed into np.random.RandomState instance
dataset/ETHPy150Open ntucllab/libact/libact/utils/__init__.py/seed_random_state