def set_random_state(estimator, random_state=0):
    if "random_state" in estimator.get_params().keys():
        estimator.set_params(random_state=random_state)
dataset/ETHPy150Open trevorstephens/gplearn/gplearn/skutils/testing.py/set_random_state/original