def check_random_state(seed):
    if seed is None or seed is np.random:
        return np.random.mtrand._rand
    if isinstance(seed, (numbers.Integral, np.integer)):
        return np.random.RandomState(seed)
    if isinstance(seed, np.random.RandomState):
        return seed
    raise ValueError('%r cannot be used to seed a numpy.random.RandomState'
                     ' instance' % seed)
Remove all leading and trailing whitespace from each cell
dataset/ETHPy150Open scipy/scipy/scipy/_lib/_util.py/check_random_state--crossover with--dataset/ETHPy150Open boakley/robotframework-workbench/rwb/editor/extensions/transmogrifier.py/CompressColumnsFilter.filter